Comments (6)
You should be able to use either the --no-metadata
flag or the --modtime=X
flag where X is some constant timestamp.
See for example https://github.com/kevinburke/go-bindata/blob/master/testdata/Makefile#L15 (I set up the tests to ensure the generated files did not generate a Git diff)
from go-bindata.
I can't easily use either of those flags because I need the size and modtime for HTTP Content-Length and caching. These are HTTP static assets that I serve with http.FileServer
.
from go-bindata.
Ah, got it, you want to avoid regenerating the output if the input hashes are the same. I already compute the hashes, it shouldn't be too crazy to support that...
from go-bindata.
I'm working on a fix, but just remembered the way I avoid this usually is by using the mtimes in a Makefile to avoid invoking go-bindata altogether, for example https://github.com/kevinburke/logrole/blob/master/Makefile#L64
from go-bindata.
I just merged a patch to kevinburke/go-bindata master, it looks good locally, though I might give it a few days before putting it in a tagged release.
from go-bindata.
I just merged a patch to kevinburke/go-bindata master, it looks good locally, though I might give it a few days before putting it in a tagged release.
I've tried running your fork, but I'm still bumping into this issue where the modTime changes when regenerating files that haven't changed, causing me to get a diff as well.
from go-bindata.
Related Issues (20)
- `-prefix` still shows prefix in comments HOT 1
- -debug generates wrong output (bindataFileInfo struct is missing) HOT 7
- zsh: command not found: go-bindata HOT 4
- 404 when hosting using `-fs` and hosting over `net/http` HOT 5
- checksum mismatch HOT 1
- Can I use this package to generate binary code for all my methods in one package and call the methods through bindata.go HOT 1
- Not reading subdirectories
- Execute binary in memory HOT 1
- binary releases ? HOT 1
- bindataFileInfo not defined when using -debug HOT 1
- Feature: add ability to completely clean embedded binary content at run time HOT 1
- centos build arm run error HOT 1
- web edit
- installation instruction not working with go1.17.1 HOT 4
- 你好,windows 10下运行报错 HOT 1
- go-staticcheck linter warnings in generated code HOT 1
- Error: no migration found
- Q: How to unpack a bindata.go file? HOT 1
- go-bindata command not working HOT 3
- Unreasonable scan results HOT 1
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 go-bindata.