From b9bf1e64f160caac23e7ee5cf9c54888188dc8f0 Mon Sep 17 00:00:00 2001 From: natsuki-hoshino Date: Mon, 7 Oct 2024 01:11:42 +0000 Subject: [PATCH] upgrade kingpin to v2 --- go.mod | 2 ++ go.sum | 4 ++++ logsource.go | 2 +- logsource_docker.go | 2 +- logsource_file.go | 2 +- logsource_systemd.go | 2 +- main.go | 2 +- 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 19d4eb9..3cc8837 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ toolchain go1.22.4 require ( github.com/alecthomas/kingpin v2.2.6+incompatible + github.com/alecthomas/kingpin/v2 v2.4.0 github.com/coreos/go-systemd/v22 v22.5.0 github.com/docker/docker v27.3.1+incompatible github.com/nxadm/tail v1.4.11 @@ -42,6 +43,7 @@ require ( github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rogpeppe/go-internal v1.13.1 // indirect + github.com/xhit/go-str2duration/v2 v2.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.30.0 // indirect diff --git a/go.sum b/go.sum index 6aebe88..19e2129 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/alecthomas/kingpin v2.2.6+incompatible h1:5svnBTFgJjZvGKyYBtMB0+m5wvrbUHiqye8wRJMlnYI= github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= +github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= @@ -92,6 +94,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= diff --git a/logsource.go b/logsource.go index 492d2e2..cf8c022 100644 --- a/logsource.go +++ b/logsource.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - "github.com/alecthomas/kingpin" + "github.com/alecthomas/kingpin/v2" ) // A LogSourceFactory provides a repository of log sources that can be diff --git a/logsource_docker.go b/logsource_docker.go index 34fb10b..ebc023c 100644 --- a/logsource_docker.go +++ b/logsource_docker.go @@ -9,7 +9,7 @@ import ( "log" "strings" - "github.com/alecthomas/kingpin" + "github.com/alecthomas/kingpin/v2" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" ) diff --git a/logsource_file.go b/logsource_file.go index 77465c7..e9366fe 100644 --- a/logsource_file.go +++ b/logsource_file.go @@ -5,7 +5,7 @@ import ( "io" "log" - "github.com/alecthomas/kingpin" + "github.com/alecthomas/kingpin/v2" "github.com/nxadm/tail" ) diff --git a/logsource_systemd.go b/logsource_systemd.go index 60f5cb6..1ed7e84 100644 --- a/logsource_systemd.go +++ b/logsource_systemd.go @@ -9,7 +9,7 @@ import ( "log" "time" - "github.com/alecthomas/kingpin" + "github.com/alecthomas/kingpin/v2" "github.com/coreos/go-systemd/v22/sdjournal" ) diff --git a/main.go b/main.go index dab37c8..8cb358e 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,7 @@ import ( "os" _ "embed" - "github.com/alecthomas/kingpin" + "github.com/alecthomas/kingpin/v2" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" )