alistanis / st Goto Github PK
View Code? Open in Web Editor NEWST - Struct Tagger - Tags your structs so you don't have to, saving you development time and encoding/decoding sanity.
License: MIT License
ST - Struct Tagger - Tags your structs so you don't have to, saving you development time and encoding/decoding sanity.
License: MIT License
It would be good to have a function that does not depend on os and flag packages. This way it could be used with gopherjs to implement a webpage with side-by-side text areas.
A more general approach to specifying ignored <types>
and <fields>
maybe useful.
Like:
<type_list1>:<field_list1>;<type_list2>:<field_list2>;...
Which would be something like:
<type1>,<type2>,...:<field1>,<field2>,...;<type3>,<type4>,...:<field3>,<field4>,...;...
Where <type_list>:<field_list>
=> ignore these fields in these types
Both <type>
and <field>
can be *
to indicate all.
And allow multiple instances of --ignore
so that people with large lists can split it across multiple lines.
Another useful mechanism may be to have the tool use tags that are meant for the tool itself. The tool would read directives for fields from its own tag, remove the tag, and replace it with generated tags.
Add support for go fmt by default.
It might be worthwhile to respect GOFILE
set by the golang generator. That way you won't have to hardcode file names in the generator specification.
Comment: In some cases, the help doesn't describe what the default behavior is. For example, it gives ways to set snake case or camel case, but doesn't describe what the default is. Same for -w, it says it changes the behavior to write to the original file, but what's the default?
Write tests like an adult
3.) You have a way to exclude structs, but I really would rather have a way to explicitly include them. Then I could just put a go:generate line above each struct, telling st to generate tags for that one struct, and it would be very clear how those tags are to be maintained right from inside the code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.