Git Product home page Git Product logo

Comments (3)

fatih avatar fatih commented on May 27, 2024 1

Now that I see this, I know why I made it like this. Because sometimes the field names and the tag names might not the same. So you don't want to change existing keys, if they are there. When I started using this privately for couple of weeks I was annoyed of that. That's the reason it's enabled and I've added a comment that we should add a --override flag.

from gomodifytags.

fatih avatar fatih commented on May 27, 2024

Thanks @zmb3. I'll look into this.

from gomodifytags.

zmb3 avatar zmb3 commented on May 27, 2024

Hey @fatih - it's a pretty easy fix (see https://github.com/zmb3/gomodifytags/commit/9cc0c1fa6d114698a592109f663b72b095e19032), but it seems you intentionally didn't code it up this way as there's a test (which is now broken) to make sure we leave existing tags alone.

Do we really need an -override flag? This may make it more difficult for editors to integrate.

My opinion is that it's fine to overwrite existing tags. In most cases, people will be using this with structs that don't have any field tags. And in cases where they do have existing tags that they want to leave alone, they can use the -line option to exclude those lines.

from gomodifytags.

Related Issues (20)

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.