• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gookit / goutil
87%

Build:
DEFAULT BRANCH: master
Repo Added 03 Aug 2019 02:29PM UTC
Files 225
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
  • No branch selected
  • alert-autofix-31
  • codex/substr-count-rune-ranges
  • copilot/fix-228
  • copilot/fix-230
  • dependabot/add-v2-config-file
  • dependabot/github_actions/actions/checkout-3
  • dependabot/github_actions/actions/checkout-5
  • dependabot/github_actions/actions/checkout-7
  • dependabot/github_actions/actions/setup-go-7
  • dependabot/github_actions/github/codeql-action-4.37.4
  • dependabot/go_modules/github.com/gookit/color-1.2.7
  • dependabot/go_modules/github.com/gookit/color-1.2.8
  • dependabot/go_modules/github.com/gookit/color-1.2.9
  • dependabot/go_modules/github.com/gookit/color-1.3.0
  • dependabot/go_modules/github.com/gookit/color-1.3.1
  • dependabot/go_modules/github.com/gookit/color-1.3.2
  • dependabot/go_modules/github.com/gookit/color-1.3.3
  • dependabot/go_modules/github.com/gookit/color-1.3.5
  • dependabot/go_modules/github.com/gookit/color-1.3.6
  • dependabot/go_modules/github.com/gookit/color-1.3.7
  • dependabot/go_modules/github.com/gookit/color-1.3.8
  • dependabot/go_modules/github.com/gookit/color-1.4.1
  • dependabot/go_modules/github.com/gookit/color-1.5.0
  • dependabot/go_modules/github.com/gookit/color-1.5.1
  • dependabot/go_modules/github.com/json-iterator/go-1.1.11
  • dependabot/go_modules/github.com/json-iterator/go-1.1.12
  • dependabot/go_modules/github.com/mattn/go-isatty-0.0.13
  • dependabot/go_modules/github.com/mattn/go-isatty-0.0.14
  • dependabot/go_modules/github.com/stretchr/testify-1.6.1
  • dependabot/go_modules/github.com/stretchr/testify-1.7.1
  • dependabot/go_modules/github.com/stretchr/testify-1.7.2
  • dependabot/go_modules/golang.org/x/sync-0.11.0
  • dependabot/go_modules/golang.org/x/sync-0.9.0
  • dependabot/go_modules/golang.org/x/sys-0.23.0
  • dependabot/go_modules/golang.org/x/sys-0.24.0
  • dependabot/go_modules/golang.org/x/sys-0.27.0
  • dependabot/go_modules/golang.org/x/sys-0.29.0
  • dependabot/go_modules/golang.org/x/sys-0.30.0
  • dependabot/go_modules/golang.org/x/term-0.23.0
  • dependabot/go_modules/golang.org/x/term-0.24.0
  • dependabot/go_modules/golang.org/x/term-0.25.0
  • dependabot/go_modules/golang.org/x/term-0.28.0
  • dependabot/go_modules/golang.org/x/term-0.29.0
  • dependabot/go_modules/golang.org/x/text-0.18.0
  • dependabot/go_modules/golang.org/x/text-0.19.0
  • dependabot/go_modules/golang.org/x/text-0.20.0
  • dependabot/go_modules/golang.org/x/text-0.22.0
  • dependabot/go_modules/honnef.co/go/tools-0.0.1-2020.1.5
  • feat-gcm
  • fix/centered-alignment-width
  • fix/negative-path-index
  • fix/split-zero-width-runes
  • fix/typos-in-comments
  • fix/update-contents-preserve-input
  • master
  • nrg-migration
  • refs/tags/v0.3.10
  • refs/tags/v0.3.11
  • refs/tags/v0.3.13
  • refs/tags/v0.3.14
  • refs/tags/v0.3.15
  • refs/tags/v0.3.8
  • refs/tags/v0.3.9
  • refs/tags/v0.4.0
  • refs/tags/v0.4.1
  • refs/tags/v0.4.2
  • refs/tags/v0.4.4
  • refs/tags/v0.4.5
  • refs/tags/v0.4.6
  • refs/tags/v0.5.0
  • refs/tags/v0.5.1
  • refs/tags/v0.5.10
  • refs/tags/v0.5.11
  • refs/tags/v0.5.12
  • refs/tags/v0.5.13
  • refs/tags/v0.5.14
  • refs/tags/v0.5.15
  • refs/tags/v0.5.2
  • refs/tags/v0.5.3
  • refs/tags/v0.5.4
  • refs/tags/v0.5.5
  • refs/tags/v0.5.7
  • refs/tags/v0.5.8
  • refs/tags/v0.5.9
  • refs/tags/v0.6.0
  • refs/tags/v0.6.1
  • refs/tags/v0.6.10
  • refs/tags/v0.6.11
  • refs/tags/v0.6.12
  • refs/tags/v0.6.13
  • refs/tags/v0.6.14
  • refs/tags/v0.6.15
  • refs/tags/v0.6.16
  • refs/tags/v0.6.17
  • refs/tags/v0.6.18
  • refs/tags/v0.6.2
  • refs/tags/v0.6.3
  • refs/tags/v0.6.4
  • refs/tags/v0.6.5
  • refs/tags/v0.6.6
  • refs/tags/v0.6.7
  • refs/tags/v0.6.8
  • refs/tags/v0.7.0
  • refs/tags/v0.7.1
  • refs/tags/v0.7.2
  • refs/tags/v0.7.3
  • refs/tags/v0.7.4
  • refs/tags/v0.7.5
  • v0.1.7
  • v0.1.9
  • v0.2.0
  • v0.2.1
  • v0.2.10
  • v0.2.11
  • v0.2.12
  • v0.2.13
  • v0.2.14
  • v0.2.16
  • v0.2.2
  • v0.2.3
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.2.7
  • v0.2.8
  • v0.2.9
  • v0.3.1
  • v0.3.2
  • v0.3.3
  • v0.3.4
  • v0.3.5
  • v0.3.6
  • v0.3.7

27 Oct 2026 12:34PM UTC coverage: 87.33% (+0.03%) from 87.305%
40504890076

push

github

inhere
feat(maputil): support the bracket index path in the get helpers

GetByPath, GetByPathKeys and GetFromAny only accepted the dot-index form
("top.arr.1"), so a path like "top.arr[1]" - which SetByPath already writes -
returned nothing.

- expand the trailing "[N]" indexes of a key segment before the walk, so
  "top.arr[1]", "top.matrix[0][1]" and "top.items[1].name" resolve. The
  top-level key is indexable too ("tags[0]"), as it already is on the set side.
- the literal key is matched first, so a key that really contains brackets
  (eg. "child[x]", "a[0]") keeps working as before. A negative index, an empty
  index and a bare "[0]" segment are kept as literal keys as well.
- the dot-index style ("top.arr.1") is unchanged.

Tests: top-level, nested and multi-index paths, out of range, negative and
empty indexes, the literal bracket keys, and the GetByPathKeys/GetFromAny
entries.

46 of 47 new or added lines in 1 file covered. (97.87%)

16149 of 18492 relevant lines covered (87.33%)

5.64 hits per line

Relevant lines Covered
Build:
Build:
18492 RELEVANT LINES 16149 COVERED LINES
5.64 HITS PER LINE
Source Files on master
  • Tree
  • List 225
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
40504890076 master feat(maputil): support the bracket index path in the get helpers GetByPath, GetByPathKeys and GetFromAny only accepted the dot-index form ("top.arr.1"), so a path like "top.arr[1]" - which SetByPath already writes - returned nothing. - expand th... push 27 Oct 2026 12:35PM UTC inhere github
87.33
40188095025 master fix(maputil): support the bracket index on the top key of SetByPath SetByKeys() short circuited a single key and the deep make, so a top key with a slice index was written as a literal key: SetByPath(&mp, "list[1]", "b") // before: mp["list[... push 25 Oct 2026 11:15AM UTC inhere github
87.3
40157136773 master fix(maputil): reject negative slice indexes when setting a value The set path parsed the slice index with `strconv.Atoi` and dropped the error, so a negative index panicked instead of returning an error - the same bug that #294 fixed on the get s... push 25 Oct 2026 03:09AM UTC inhere github
87.31
40156510080 master fix(maputil): reject negative slice indexes (#294) Co-authored-by: terminalchai <213856599+terminalchai@users.noreply.github.com> push 25 Oct 2026 02:59AM UTC web-flow github
87.32
40130788950 fix/negative-path-index fix(maputil): reject negative slice indexes Pull #294 25 Oct 2026 02:42AM UTC terminalchai github
87.32
40104760568 master test: migrate the deprecated testutil/assert import to x/assert staticcheck reports 60 SA1019 findings in the CI check run: github.com/gookit/goutil/testutil/assert is deprecated: use github.com/gookit/goutil/x/assert The testutil/assert pa... push 24 Oct 2026 02:57PM UTC inhere github
87.31
40102233627 master test(testutil): skip the time.Local tests with the race detector SetTimeLocal() writes the process global time.Local. Any goroutine that calls time.Now() reads it at the same time - eg: an http server goroutine that is just shutting down after it... push 24 Oct 2026 02:23PM UTC inhere github
87.31
40101337356 master ci: run the unit tests with the race detector A plain `go test` can not catch a race between the goroutines of the async helpers (eg: SafeGo) and the test code. Add a "Race detector" job on ubuntu-latest, go stable. push 24 Oct 2026 02:11PM UTC inhere github
87.29
39966677019 master fix(fsutil): guard nil handleFn in UpdateContents and refine docs - return an error instead of panicking when handleFn is nil - drop the ineffective 0600 perm arg (no O_CREATE), linear error flow - document that the file must exist, the write i... push 23 Oct 2026 02:06PM UTC inhere github
87.29
39965003877 master fix(fsutil): read existing contents before updating a file (#293) push 23 Oct 2026 01:54PM UTC web-flow github
87.3
See All Builds (606)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc