Skip to content

Commit

Permalink
Clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
spacez320 committed Nov 16, 2024
1 parent 151d6c8 commit c14b6a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ Planned improvements include things like:
- [x] ... and Elasticsearch.
- [ ] More detailed and varied display modes.
- [ ] Historical querying.
- [ ] Beter management of textual data, including diffs.

Similar Projects
----------------
Expand Down
2 changes: 1 addition & 1 deletion cmd/shui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ var (
promExporterAddr string // Address for Prometheus metrics page.
promPushgatewayAddr string // Address for Prometheus Pushgateway.
queries multiArg // Queries to execute.
readStdin bool // Whether input comes from standard input.
showHelp bool // Whether or not to show helpt
showLogs bool // Whether or not to show logs.
showStatus bool // Whether or not to show statuses.
showVersion bool // Whether or not to display a version.
silent bool // Whether or not to be quiet.
readStdin bool // Whether input comes from standard input.

// Supplied by the linker at build time.
version string
Expand Down
7 changes: 2 additions & 5 deletions shui.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func Run(config lib.Config, displayConfig lib.DisplayConfig) {
slog.Debug("Running with config", "config", config)
slog.Debug("Running with display config", "displayConfig", displayConfig)

// Define special query value when reading standard input.
// Define a special query value when reading standard input.
if config.ReadStdin {
config.Queries = []string{STDIN_QUERY_NAME}
}
Expand All @@ -53,7 +53,7 @@ func Run(config lib.Config, displayConfig lib.DisplayConfig) {

doneQueriesChan, pauseQueryChans = lib.Query(
lib.QUERY_MODE_STDIN,
-1,
-1, // Stdin mode is always continuous and the query itself must detect EOF.
config.Delay,
config.Queries,
config.Port,
Expand Down Expand Up @@ -122,9 +122,6 @@ func Run(config lib.Config, displayConfig lib.DisplayConfig) {
)
}

// XXX This isn't strictly necessary, mainly because getting here shouldn't be possible
// (`lib.Results` does not have any intentional return condition), but it's being left here in
// case in the future we do want to control for query completion.
<-doneQueriesChan
slog.Debug("Received the last result, nothing left to do")
close(doneQueriesChan)
Expand Down

0 comments on commit c14b6a0

Please sign in to comment.