Git Product home page Git Product logo

Comments (6)

justmumu avatar justmumu commented on May 5, 2024 1

Guys,

Glob usage can be different due to terminal differences.
For example, if you are using zsh, **/*.go is just works. But you are on bash it does not by default.

I think the clearest way to use addlicense is using it with find command.
As an example to identical with **/*.go:
addlicense -check -v -l bsd -c "Bla Bla." $(find . -name "*.go" -type f -print0 | xargs -0)

from addlicense.

DarthHater avatar DarthHater commented on May 5, 2024

I took a deeper look last night and it doesn't look like this is actually implemented? If that's the case @nblair and I were thinking of doing so, if y'all would welcome a PR!

from addlicense.

benjivesterby avatar benjivesterby commented on May 5, 2024

This seems to be working for me with ./*.go and just individual filenames. What were you trying @DarthHater

from addlicense.

DarthHater avatar DarthHater commented on May 5, 2024

Basically, I just want to exclude stuff like README.md, etc... that really don't need a license file. I'll give it a twirl with your suggestion!

from addlicense.

gtrevg avatar gtrevg commented on May 5, 2024

@DarthHater For reference, there's a similar project: https://github.com/elastic/go-licenser

Although it has less features, it'll walk the whole tree for you from the starting path you give it and will only apply the license to files that have the extension as defined by the -ext flag. I think it may only work for .go files, though.

I ended up having to use this other tool because //go:generate doesn't play nicely with wild cards.

from addlicense.

gtrevg avatar gtrevg commented on May 5, 2024

@justmumu -- We ended up using addlicense with the same technique you describe.

from addlicense.

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.