Git Product home page Git Product logo

Comments (6)

lu4p avatar lu4p commented on May 18, 2024 1

Good idea currently it doesn't work, will add support.

from binclude.

lu4p avatar lu4p commented on May 18, 2024 1

PRs which improve the docs are welcome 👍

from binclude.

lu4p avatar lu4p commented on May 18, 2024

@audiolion I now added support for implicit filename based build tags like file_linux.go, file_windows.go, file_darwin_arm.go

From the build documentation:

If a file's name, after stripping the extension and a possible _test suffix, matches any of the following patterns:

*_GOOS
*_GOARCH
*_GOOS_GOARCH

(example: source_windows_amd64.go) where GOOS and GOARCH represent any known operating system and architecture values respectively, then the file is considered to have an implicit build constraint requiring those terms (in addition to any explicit constraints in the file).

from binclude.

audiolion avatar audiolion commented on May 18, 2024

Thanks for the fast turnaround. I will try it out next week at work. Would you like a PR to document the feature? I don't think other embeds like go.rice, packr/pkger, have this feature.

from binclude.

lu4p avatar lu4p commented on May 18, 2024

Actually this isn't finished yet. I could generate different files like binclude_windows.go binclude_linux.go binclude_darwin.go, this would allow embeddding different files for each os and avoid the need to regenerate the file when the platform changes.

from binclude.

lu4p avatar lu4p commented on May 18, 2024

Done

from binclude.

Related Issues (11)

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.