Skip to content

Commit

Permalink
Clean-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
spacez320 committed Feb 3, 2024
1 parent f4ff2dd commit b712a24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion internal/lib/results_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestFilterResult(t *testing.T) {
testResults := storage.Results{
Labels: []string{"fizz"},
Results: []storage.Result{
storage.Result{
{
Time: testTime,
Value: "foo bar",
Values: testResultValues,
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"os"
"strings"
Expand Down Expand Up @@ -66,8 +66,8 @@ var (
} // Log levels acceptable as a flag.
)

// Parses a comma delimited argument string, returning a slice of strings if
// any are found, or an empty slice if not.
// Parses a comma delimited argument string, returning a slice of strings if any are found, or an
// empty slice if not.
func parseCommaDelimitedArg(arg string) []string {
if parsed := strings.Split(arg, ","); parsed[0] == "" {
return []string{}
Expand Down Expand Up @@ -103,7 +103,7 @@ func main() {
// Set-up logging.
if silent || displayMode == int(lib.DISPLAY_MODE_GRAPH) {
// Silence all output.
logger.SetOutput(ioutil.Discard)
logger.SetOutput(io.Discard)
} else {
// Set the default to be standard error--result modes may change this.
slog.SetDefault(slog.New(slog.NewTextHandler(
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ func testResults() Results {
return Results{
Labels: []string{"foo", "bar"},
Results: []Result{
Result{
{
Time: testTime,
Value: "foo",
Values: nil,
},
Result{
{
Time: testTime.Add(time.Second * 30),
Value: "bar",
Values: nil,
Expand Down

0 comments on commit b712a24

Please sign in to comment.