Last 12 weeks · 0 commits
2 of 6 standards met
I encountered this edge case, say you have this struct transform with : Now, the API offers you its data like this: So, the API returns the web's URL in a field called , but gomodifytags transforms the part of the field "URL" as URL and not as Url. That's okay. Currently, this can be solved by, either: manually modifying the tag name, with the downside that refreshing the tags will overwrite such manual change. changing the name of the field in the struct, with the downside that I prefer , not in my struct field.
Add strict versions of PascalCase and camelCase, as well as CONST_CASE from #95, with respective basic test cases. Based on my experience, the former two are used extensively at least in C# and JavaScript/TypeScript. In fact, I don't personally know another language that strongly encourages retaining all caps segments in a camel/pascal-case identifier (DBName rather than DbName) other than Go. Not adding UPPERCASE and lowercase transformations, as the supposed use case referred to by the OP would most probably be achieved by quoting entity names in SQL queries, or using either snake_case (PostgreSQL) or CONST_CASE (SQL standard), so the word boundaries are retained. If anybody does indeed need pure case conversions (could also be that they were using _ in Go identifiers, uhh...), feel free to reply here.
Repository: fatih/gomodifytags. Description: Go tool to modify struct field tags Stars: 2395, Forks: 139. Primary language: Go. Languages: Go (100%). License: BSD-3-Clause. Topics: go, golang, structs, tags, tool. Latest release: v1.17.0 (2y ago). Open PRs: 5, open issues: 8. Last activity: 1y ago. Community health: 42%. Top contributors: fatih, LeGEC, madelinekalil, dependabot[bot], perrito666, zmb3, ramya-rao-a, testwill, brantou, vigo and others.