Skip to content

Commit

Permalink
[WIP] run & fix make lint
Browse files Browse the repository at this point in the history
  • Loading branch information
agebhar1 committed Feb 10, 2024
1 parent c26e2ba commit 4f6dae9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmd/chunks-inspect/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package main
import (
"encoding/binary"
"fmt"
"github.com/grafana/loki/pkg/chunkenc"
"io"

"github.com/grafana/loki/pkg/chunkenc"
)

type LokiChunk struct {
Expand Down
3 changes: 2 additions & 1 deletion cmd/chunks-inspect/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"flag"
"fmt"
logql "github.com/grafana/loki/pkg/logql/log"
"log"
"os"
"strings"
"time"

logql "github.com/grafana/loki/pkg/logql/log"
)

const format = "2006-01-02 15:04:05.000000 MST"
Expand Down
4 changes: 2 additions & 2 deletions cmd/chunks-inspect/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ func (t *Time) UnmarshalJSON(b []byte) error {
p := strings.Split(string(b), ".")
switch len(p) {
case 1:
v, err := strconv.ParseInt(string(p[0]), 10, 64)
v, err := strconv.ParseInt(p[0], 10, 64)
if err != nil {
return err
}
*t = Time(v * second)

case 2:
v, err := strconv.ParseInt(string(p[0]), 10, 64)
v, err := strconv.ParseInt(p[0], 10, 64)
if err != nil {
return err
}
Expand Down

0 comments on commit 4f6dae9

Please sign in to comment.