Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bare tags and kong: tags don't work together in an embedded struct #558

@dgunay

Description

@dgunay

This particular setup doesn't behave the way I want: https://go.dev/play/p/vYCFMxlM9Lk

(gist in case the playground link ever expires https://gist.github.com/dgunay/3755d6956bc2c35ce11b26961c8fe97b)

I want to be able to reuse the behavior "either --name=STRING or --pick are required", by embedding the struct into other commands. It works, until I add the kong:"predictor=session-name" tag, then the xor requirement no longer works.

I am able to work around it by changing all the tags to go under a kong: tag. Changing the predictor tag to be bare does not work (probably due to some implementation detail of https://github.com/WillAbides/kongplete.)

Anyway, this contradicts the readme:

kong/README.md

Line 566 in ecee830

Both can coexist with standard Tag parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions