Skip to content

Commit

Permalink
dependency updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bzimmer committed May 26, 2024
1 parent 2075fae commit 047039c
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 473 deletions.
2 changes: 1 addition & 1 deletion cmd/ma/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"os"
"time"

"github.com/armon/go-metrics"
"github.com/bzimmer/httpwares"
"github.com/bzimmer/manual"
"github.com/bzimmer/smugmug"
"github.com/hashicorp/go-metrics"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/afero"
Expand Down
2 changes: 1 addition & 1 deletion cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"time"

"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/rs/zerolog/log"
"github.com/spf13/afero"
"github.com/urfave/cli/v2"
Expand Down
2 changes: 1 addition & 1 deletion export.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"strings"
"time"

"github.com/armon/go-metrics"
"github.com/bzimmer/smugmug"
"github.com/hashicorp/go-metrics"
"github.com/rs/zerolog/log"
"github.com/spf13/afero"
"github.com/urfave/cli/v2"
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@ module github.com/bzimmer/ma
go 1.20

require (
github.com/armon/go-metrics v0.4.1
github.com/barasher/go-exiftool v1.9.0
github.com/barasher/go-exiftool v1.10.0
github.com/bzimmer/httpwares v0.1.3
github.com/bzimmer/manual v0.1.5
github.com/bzimmer/smugmug v0.7.2
github.com/rs/zerolog v1.29.1
github.com/hashicorp/go-metrics v0.5.3
github.com/rs/zerolog v1.33.0
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
github.com/spf13/afero v1.9.5
github.com/spf13/afero v1.11.0
github.com/stretchr/testify v1.8.2
github.com/urfave/cli/v2 v2.25.3
github.com/vitali-fedulov/images4 v1.2.1
golang.org/x/sync v0.2.0
golang.org/x/text v0.9.0
github.com/urfave/cli/v2 v2.27.2
github.com/vitali-fedulov/images4 v1.3.1
golang.org/x/sync v0.7.0
golang.org/x/text v0.15.0
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/time v0.5.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
472 changes: 31 additions & 441 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestList(t *testing.T) {
mux.HandleFunc("/album/RM4BL2", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "testdata/album_RM4BL2.json")
})
mux.HandleFunc("/album/qety", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/album/qety", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
})
mux.HandleFunc("/node/VsQ7zr", func(w http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion ma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"testing"
"time"

"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/rs/zerolog"
"github.com/spf13/afero"
"github.com/stretchr/testify/assert"
Expand Down
8 changes: 4 additions & 4 deletions patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func decode(a *assert.Assertions, r io.Reader) map[string]any {

func newPatchTestMux(a *assert.Assertions) http.Handler {
mux := http.NewServeMux()
mux.HandleFunc("/image/GH8UQ9-0", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/image/GH8UQ9-0", func(_ http.ResponseWriter, _ *http.Request) {
a.Fail("should not be called")
})
mux.HandleFunc("/image/B2fHSt7-0", func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -31,7 +31,7 @@ func newPatchTestMux(a *assert.Assertions) http.Handler {
a.Contains(data, "Latitude")
http.ServeFile(w, r, "testdata/image_B2fHSt7-0.json")
})
mux.HandleFunc("/image/B2fHSt7-2", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/image/B2fHSt7-2", func(_ http.ResponseWriter, _ *http.Request) {
a.Fail("should not be called")
})
mux.HandleFunc("/image/B2fHSt7-3", func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -40,7 +40,7 @@ func newPatchTestMux(a *assert.Assertions) http.Handler {
a.Empty(data["KeywordArray"])
http.ServeFile(w, r, "testdata/image_B2fHSt7-0.json")
})
mux.HandleFunc("/image/B2fHSt7-4", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/image/B2fHSt7-4", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
enc := json.NewEncoder(w)
a.NoError(enc.Encode(map[string]any{
Expand All @@ -55,7 +55,7 @@ func newPatchTestMux(a *assert.Assertions) http.Handler {
"Message": "Not Found",
}))
})
mux.HandleFunc("/album/RM4BL3", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/album/RM4BL3", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
enc := json.NewEncoder(w)
a.NoError(enc.Encode(map[string]any{
Expand Down
2 changes: 1 addition & 1 deletion runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"time"

"github.com/armon/go-metrics"
"github.com/bzimmer/smugmug"
"github.com/hashicorp/go-metrics"
"github.com/rs/zerolog/log"
"github.com/spf13/afero"
"github.com/urfave/cli/v2"
Expand Down
2 changes: 1 addition & 1 deletion runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestMetrics(t *testing.T) {
run(t, &tt, nil, func() *cli.Command {
return &cli.Command{
Name: "metrix",
Action: func(c *cli.Context) error {
Action: func(_ *cli.Context) error {
return nil
},
}
Expand Down
2 changes: 1 addition & 1 deletion similar.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"io/fs"
"strconv"

"github.com/armon/go-metrics"
"github.com/hashicorp/go-metrics"
"github.com/rs/zerolog/log"
"github.com/spf13/afero"
"github.com/urfave/cli/v2"
Expand Down
6 changes: 3 additions & 3 deletions up.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func input(c *cli.Context) ([]string, error) {
}

func visit(c *cli.Context) filesystem.PreFunc {
return func(fs afero.Fs, filename string) (bool, error) {
return func(_ afero.Fs, _ string) (bool, error) {
runtime(c).Metrics.IncrCounter([]string{"uploadable.fs", "visit"}, 1)
return true, nil
}
Expand All @@ -59,7 +59,7 @@ func extensions(c *cli.Context) filesystem.PreFunc {
}

func open(c *cli.Context) filesystem.UseFunc {
return func(up *smugmug.Uploadable) error {
return func(_ *smugmug.Uploadable) error {
runtime(c).Metrics.IncrCounter([]string{"uploadable.fs", "open"}, 1)
return nil
}
Expand Down Expand Up @@ -185,7 +185,7 @@ func (x *mirror) mirror(c *cli.Context) error {
return err
}
u.Pre(filesystem.Extensions(c.StringSlice("ext")...))
u.Pre(func(fs afero.Fs, filename string) (bool, error) {
u.Pre(func(_ afero.Fs, filename string) (bool, error) {
m.Lock()
delete(images, filepath.Base(filename))
m.Unlock()
Expand Down
4 changes: 2 additions & 2 deletions up_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ func TestUpload(t *testing.T) {
a := assert.New(t)

mux := http.NewServeMux()
mux.HandleFunc("/album/qety", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/album/qety", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
})
mux.HandleFunc("/album/qety!images", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/album/qety!images", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
})
mux.HandleFunc("/album/TDZWbg!images", func(w http.ResponseWriter, r *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestUser(t *testing.T) {
func TestUserError(t *testing.T) {
a := assert.New(t)
mux := http.NewServeMux()
mux.HandleFunc("/!authuser", func(w http.ResponseWriter, r *http.Request) {
mux.HandleFunc("/!authuser", func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
enc := json.NewEncoder(w)
a.NoError(enc.Encode(map[string]any{
Expand Down

0 comments on commit 047039c

Please sign in to comment.