Giter VIP home page Giter VIP logo

Comments (5)

sethgrid avatar sethgrid commented on May 31, 2024

go vet will complain if the tag is not key:"value":
https://github.com/golang/tools/blob/master/cmd/vet/structtag.go#L70

from go-restructure.

telotortium avatar telotortium commented on May 31, 2024

You should probably use the tag "restructure" instead, since that's the name of your library.

from go-restructure.

lithammer avatar lithammer commented on May 31, 2024

I think re (after Python's regexp package) is nice and succinct tag name.

type Example struct {
    MyField string `re:"[^@]+"`
}

from go-restructure.

cathalgarvey avatar cathalgarvey commented on May 31, 2024

Would really love this feature. Perhaps use restructure OR re? If it has to be one, propriety suggests it should be restructure, because explicit is better than...

The only problem with using 'normal' tags is that it imposes a backslash burden on quotes in the regex, but the advantages, IMO, outweigh that. The convenience of being able to Regex-out something and immediately serialise to JSON with tagged params, for example, is an obvious use-case.

from go-restructure.

alexflint avatar alexflint commented on May 31, 2024

This was resolved in #12

from go-restructure.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.