Comments (6)
Good idea currently it doesn't work, will add support.
from binclude.
PRs which improve the docs are welcome
from binclude.
@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.
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.
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.
Done
from binclude.
Related Issues (11)
- Allow direct `go generate` usage (no CLI) HOT 3
- Remove support for Brotli HOT 5
- os/exec wrapper caching HOT 10
- Binclude generated code doesn't always match go fmt HOT 4
- Sort map
- Action Required: Fix Renovate Configuration
- Generates \ slashes instead of / HOT 1
- Cmd.Run() in binexec.go doesn't remove executable as documented HOT 1
- Does this works for binary files HOT 9
- Include expects a constant string literal HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binclude.