Skip to content

Allow commandline directives#401

Merged
klauspost merged 1 commit intotinylib:masterfrom
klauspost:cmdline-directives
Aug 22, 2025
Merged

Allow commandline directives#401
klauspost merged 1 commit intotinylib:masterfrom
klauspost:cmdline-directives

Conversation

@klauspost
Copy link
Collaborator

@klauspost klauspost commented Aug 19, 2025

Make it possible to add directives as commandline parameter.

Alternatively to //msgp:tag json directives can also be specified using the -d flag. Example: msgp -d "tag json". Multiple flags can be added.

Directives in files take precedence over commandline.

This is mainly to be able to compact directives into a single go generate line. We have something like 4-5 directives clearomitted, timezone utc, etc in some of our files, so this would make this neater.

Bonus: Print info on all directives.

Make it possible to add directives as commandline parameter.

Alternatively to `//msgp:tag json` directives can also be specified using the `-d` flag. Example: `msgp -d "tag json"`. Multiple flags can be added.

Directives in files take precedence over commandline.

Bonus: Print info on all directives.
@klauspost klauspost requested a review from philhofer August 19, 2025 10:55
@klauspost klauspost merged commit 8e91241 into tinylib:master Aug 22, 2025
4 checks passed
@klauspost klauspost deleted the cmdline-directives branch August 22, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant