Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.0.12-backport: Do not merge. #59

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
timeout-minutes: 1
strategy:
matrix:
go-version: ['>=1.21.0']
go-version: ['>=1.20']
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
timeout-minutes: 7
strategy:
matrix:
go-version: ['>=1.21.0']
go-version: ['>=1.20']
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
go-version: ['>=1.21.0']
go-version: ['>=1.20']
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
timeout-minutes: 3
strategy:
matrix:
go-version: ['>=1.21.0']
go-version: ['>=1.20']
platform: [ubuntu-22.04]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -214,7 +214,7 @@ jobs:
# timeout-minutes: 2
# strategy:
# matrix:
# go-version: ['>=1.21.0']
# go-version: ['>=1.20']
# platform: [ubuntu-22.04]
# runs-on: ${{ matrix.platform }}
# steps:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Most recent version is listed first.
# v0.0.13
- Update Go version: https://github.com/komuw/kama/pull/56

# v0.0.12-backport
- Add config option for how many slices/maps to display: https://github.com/komuw/kama/pull/58

# v0.0.12
- Pretty print errors: https://github.com/komuw/kama/pull/54
- Handle more interfaces: https://github.com/komuw/kama/pull/55
Expand Down
3 changes: 2 additions & 1 deletion dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"fmt"
"math"
"reflect"
"slices"
"sort"
"strings"
"unicode"

"golang.org/x/exp/slices"
)

func dump(val reflect.Value, hideZeroValues bool, indentLevel int) string {
Expand Down
13 changes: 7 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
module github.com/komuw/kama

go 1.21
go 1.20

require (
golang.org/x/sys v0.16.0
golang.org/x/tools v0.17.0
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
golang.org/x/sys v0.5.0
golang.org/x/tools v0.6.0
)

require (
github.com/google/go-cmp v0.6.0 // indirect
golang.org/x/mod v0.14.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
golang.org/x/mod v0.8.0 // indirect
)

require (
github.com/pkg/errors v0.9.1 // test
go.akshayshah.org/attest v1.0.2 // test
go.uber.org/goleak v1.3.0 // test
go.uber.org/goleak v1.2.1 // test
)
31 changes: 14 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
go.akshayshah.org/attest v1.0.2 h1:qOv9PXCG2mwnph3g0I3yZj0rLAwLyUITs8nhxP+wS44=
go.akshayshah.org/attest v1.0.2/go.mod h1:PnWzcW5j9dkyGwTlBmUsYpPnHG0AUPrs1RQ+HrldWO0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2 changes: 1 addition & 1 deletion kama.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

var (
cfg = Config{MaxLength: 14} //nolint:gochecknoglobals
onceCfg *sync.Once //nolint:gochecknoglobals
onceCfg = &sync.Once{} //nolint:gochecknoglobals
)

// Config controls how printing is going to be done.
Expand Down
2 changes: 1 addition & 1 deletion packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package kama
import (
"fmt"
"go/types"
"slices"
"strings"

"golang.org/x/exp/slices"
"golang.org/x/tools/go/packages"
"golang.org/x/tools/go/types/typeutil"
)
Expand Down
16 changes: 8 additions & 8 deletions testdata/vars_test/stdlib_context_Background.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

[
NAME: context.backgroundCtx
KIND: struct
SIGNATURE: [context.backgroundCtx *context.backgroundCtx]
NAME: context.emptyCtx
KIND: int
SIGNATURE: [*context.emptyCtx context.emptyCtx]
FIELDS: []
METHODS: [
Deadline func(context.backgroundCtx) (time.Time, bool)
Done func(context.backgroundCtx) <-chan struct {}
Err func(context.backgroundCtx) error
String func(context.backgroundCtx) string
Value func(context.backgroundCtx, interface {}) interface {}
Deadline func(*context.emptyCtx) (time.Time, bool)
Done func(*context.emptyCtx) <-chan struct {}
Err func(*context.emptyCtx) error
String func(*context.emptyCtx) string
Value func(*context.emptyCtx, interface {}) interface {}
]
SNIPPET: context.Background
]
16 changes: 8 additions & 8 deletions testdata/vars_test/stdlib_context_TODO.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

[
NAME: context.todoCtx
KIND: struct
SIGNATURE: [context.todoCtx *context.todoCtx]
NAME: context.emptyCtx
KIND: int
SIGNATURE: [*context.emptyCtx context.emptyCtx]
FIELDS: []
METHODS: [
Deadline func(context.todoCtx) (time.Time, bool)
Done func(context.todoCtx) <-chan struct {}
Err func(context.todoCtx) error
String func(context.todoCtx) string
Value func(context.todoCtx, interface {}) interface {}
Deadline func(*context.emptyCtx) (time.Time, bool)
Done func(*context.emptyCtx) <-chan struct {}
Err func(*context.emptyCtx) error
String func(*context.emptyCtx) string
Value func(*context.emptyCtx, interface {}) interface {}
]
SNIPPET: context.TODO
]
Loading