Skip to content

Commit

Permalink
Update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
FollowTheProcess committed Jan 11, 2025
1 parent 1530762 commit ae5a7a1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
11 changes: 8 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ module github.com/FollowTheProcess/cli
go 1.23

require (
github.com/FollowTheProcess/snapshot v0.1.0
github.com/FollowTheProcess/test v0.18.0
github.com/FollowTheProcess/snapshot v0.3.0
github.com/FollowTheProcess/test v0.19.1
)

require github.com/google/go-cmp v0.6.0 // indirect
require (
github.com/fatih/color v1.18.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
golang.org/x/sys v0.29.0 // indirect
)
23 changes: 15 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
github.com/FollowTheProcess/snapshot v0.1.0 h1:G5tWpBXVre6cTrmN1OWZLiTnqEi9IKLiewtQQYOnQqc=
github.com/FollowTheProcess/snapshot v0.1.0/go.mod h1:sJv2oq83QK5Yj6+JVts8fQIaAJjQfsxN/WtGqX8oKIg=
github.com/FollowTheProcess/test v0.18.0 h1:uEhAtTfSr2cOBQKUvtsNdRIlw5cJDMO08fnNKNXPzB0=
github.com/FollowTheProcess/test v0.18.0/go.mod h1:zG9Lr2UaeraA/KaeCLqFbmvvhmz+lDXI8LuqDOACbFM=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8=
golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw=
github.com/FollowTheProcess/snapshot v0.3.0 h1:LpTQCtuT0dTeWi2HhmHgHu17TtZlRPMBGtOzlQfh9HY=
github.com/FollowTheProcess/snapshot v0.3.0/go.mod h1:ADH1yxxSZgDhTH5hUe+g0gB+ZQ/TGELfPHTw853qJjw=
github.com/FollowTheProcess/test v0.19.1 h1:F43YTgl+shq6gdGFyliozOjunUqL7dIZa9Bp5i+/0ww=
github.com/FollowTheProcess/test v0.19.1/go.mod h1:lRQGHFDEY+V2bnJkKktAE088s7L8L1qdNjZexqWInXI=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
2 changes: 1 addition & 1 deletion internal/flag/flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ func TestFlagValue(t *testing.T) {

err = ipFlag.Set("192.0.2.1")
test.Ok(t, err)
test.Diff(t, ipFlag.Get(), net.ParseIP("192.0.2.1"))
test.DiffBytes(t, ipFlag.Get(), net.ParseIP("192.0.2.1"))
test.Equal(t, ipFlag.Type(), "ip")
test.Equal(t, ipFlag.String(), "192.0.2.1")
})
Expand Down
6 changes: 3 additions & 3 deletions internal/flag/set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"slices"
"testing"

"github.com/FollowTheProcess/cli/internal/colour"
"github.com/FollowTheProcess/cli/internal/flag"
"github.com/FollowTheProcess/snapshot"
"github.com/FollowTheProcess/test"
Expand Down Expand Up @@ -1401,12 +1402,11 @@ func TestUsage(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
// Force no colour in tests
t.Setenv("NO_COLOR", "true")

snap := snapshot.New(t, snapshot.Update(*update))
set := tt.newSet(t)

colour.Disable = true // For testing

got, err := set.Usage()
test.Ok(t, err)

Expand Down

0 comments on commit ae5a7a1

Please sign in to comment.