musttag
musttag copied to clipboard
🚔 Enforce field tags in (un)marshaled structs
This PR contains the following three changes: - Support output path for non-tag field - Support output filename and line number where the non-tag field is located - Support output...
I wanted to add `envconfig` tag as explicit tag required for function `Process`: ```yaml - name: github.com/kelseyhightower/envconfig.Process tag: envconfig arg-pos: 1 ``` As it stated in README.md, tag `ignored` is...
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.23.0 to 0.24.0. Commits 3057be8 go.mod: update golang.org/x dependencies 4653e48 gopls/internal/analysis: add skipped analysis simplify on generated code f855a53 gopls/internal/telemetry/cmd/stacks: use authentication token 3ffd605 gopls/doc/features: fix prominent...
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.24.0 to 0.25.0. Commits 7398f36 all: fix some symbols error in comment f111c72 go/callgraph/rta: skip test on js platform 9f9b7e3 gopls/internal/settings: add missing deep cloning in Options.Clone...
The Features section of the README could be completed with an explanation why there is a white list. A good one was provided [here](https://github.com/go-simpler/musttag/issues/103#issuecomment-2467508193) > Types that implement `sql.Scanner` know...
I looked on GitHub about the packages commonly excluded from `musttag` https://github.com/search?q=path%3A%2F.golangci*%20%22musttag%3A%22%20%22functions%22%20-path%3A*reference*%20&type=code I found that https://github.com/goccy/go-json is frequently excluded from `musttag` ```yaml musttag: functions: - name: github.com/goccy/go-json.Marshal tag: json -...
it was a long journey to figure out what exactly linter was unhappy with :) Simple example: ```go type AddUsersResponse struct { Seq int `json:"seq,omitempty"` Succeed []int `json:"succeed,omitempty"` Errors []AddUsersResponseError...
I'm currently working on a project that uses `json` as the default tag for `sqlx`. I've resorted to overriding every single function, however this is quite unwieldy. How would you...
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.36.0 to 0.39.0. Commits 034e59c internal/analysis/analyzerutil: fix FileUsesGoVersion 076bd80 gopls/internal/filewatcher: retry directory reading upon failure 605803f go/analysis/passes/loopclosure: simplify using IsMethodNamed 2c6e03f internal/testenv: allow Apple diff too 82112c0...
Would be useful to have a way to musttag flag structs even if they are not Un/Marshaled within the project they're in. For example, library packages may not Un/Marshal all...