Commit Graph

23 Commits

Author SHA1 Message Date
Tobias Schmidt
8ed2cd0f6d Fix go format of generated code
The following changes make the generated code go fmt compatible.
2015-10-23 03:48:06 -04:00
Jordan Liggitt
7f4fb1184f Allow excluding metadata from built assets 2015-08-13 15:37:16 -04:00
Brandon Mulcahy
96e3c9c230 Don't write NUL bytes in uncompressed_memcopy() 2015-07-28 07:21:58 -04:00
Tamir Duberstein
ff362dd1f1 Use filepath everywhere instead of path
For non-slashed paths (e.g. Windows) `path` does the wrong thing.
Sadly this is not documented, but a cursory glance at the go sources
reveals that `filepath` uses `os.PathSeparator` everywhere while
`path` uses a literal `"/"`.
2015-07-02 11:44:17 -04:00
ikawaha
49f71bc21c Remove reflect and unsafe from header_compressed_nomemcopy 2015-06-13 23:32:09 +09:00
Tamir Duberstein
dfcf23b04e camelCase instead of snake_case 2015-05-11 21:44:51 -04:00
Tamir Duberstein
ba26659a34 bindataFileInfo 2015-05-11 15:45:16 -04:00
Tamir Duberstein
ffff253524 bindataRead 2015-05-11 15:42:14 -04:00
Tamir Duberstein
c3e4c77465 Emit errcheck-passing code 2015-05-08 16:15:37 -04:00
Jordan Liggitt
1d06945605 Always encode binary data to ascii-escaped strings 2015-04-01 15:44:58 -04:00
Tobias Schottdorf
b5d9eff767 add mode and modTime flags
In some situations, it is desired to have reproducible runs of `go-bindata`
from a fixed git repository commit. Since mtimes and file modes are not
generally versioned, the newly introduced flags aid in that quest by allowing
to completely replace those two pieces of data by something fixed.

Example:
//go:generate go-bindata -pkg resource -mode 0644 -modtime 1388530800 \
                         -o ./embedded.go ./ui/...
2015-03-10 19:17:17 +01:00
Ryosuke IWANAGA
0267f6e673 Add RestoreAsset/RestoreAssets methods 2014-12-08 23:02:06 +09:00
Ryosuke IWANAGA
5dec5f37be Adjust release mode for AssetInfo() 2014-12-08 07:35:15 +09:00
Jessica Forrester
2c5bf09f1b Fix extreme memory bloat during compile time. When using uncompressed mode show raw UTF-8 strings for better diffs. 2014-11-20 10:29:22 -05:00
Jim Teeuwen
d3feb9534c Removes unnecessary return in writeReleaseAsset. This satisfies
the rules for `go vet`. Addresses issue #35

Signed-off-by: Jim Teeuwen <jimteeuwen@gmail.com>
2014-06-09 12:31:18 +02:00
Jim Teeuwen
17800c65a0 Fixes formatting of various generated outputs to be
more compatible with `go fmt`. This partially addresses
issue #34

Signed-off-by: Jim Teeuwen <jimteeuwen@gmail.com>
2014-05-28 14:43:02 +02:00
Anand Gaitonde and Michael Maximilien
f93f031745 Asset retrieval is independent of OS Path
That is for Windows \\ are replaced with / since the
asset map uses paths with /
2014-05-16 10:34:04 -07:00
Alan Shreve
8e87ecda2a return errors from calls to Asset() instead of ever panicking 2013-11-08 21:28:49 +02:00
Jim Teeuwen
cca9f8e6b7 Removes output of both debug and release code. There really
is no point to this.

All output (including TOC) is now written to a single output file.
This allows us to have different output file names to be specified.
Each for a different version generated code with its own build tags.
Consequently offering much greater flexibility in the way generated
code is to be used in a host application.

Fixes test outputs to match all these changes.
2013-10-30 14:45:04 +01:00
Jim Teeuwen
12a480432a Implements writing of TOC file. Refactors code for debug and release
writers. Adds output examples for various output modes.
2013-10-30 13:14:58 +01:00
Jim Teeuwen
efd0c57cfd Fixes some minor translation issues. 2013-10-30 11:42:09 +01:00
Jim Teeuwen
ae16b2b3c6 Finishes imlpementing the various debug and release output
modes. For debug we always read assets from disk and ignore
the compression and memcopy options. For release mode, the
assets are all embedded and the compression/memcopy options
are taken into account.
2013-10-30 02:16:14 +01:00
Jim Teeuwen
17f2782db6 Implements output of debug code.
Partially imlpements output of release code.
Reorganizes testdata directory.
2013-10-30 02:11:04 +01:00