go-bindata(8)

✨ NAME ✨

go-bindata β€” bestie, this thing embeds data right into your Go program πŸ’– (and yes, it's a System Manager's Manual page, very official, very demure)


🌸 SYNOPSIS 🌸

go-bindata [options] input [input ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you've got files. random files. binary files, even. and you want them inside your Go program. go-bindata literally converts any file into manageable Go source code, no cap. it's giving "embed binary data into a Go program" main character energy. and as a lil bonus, the file data is optionally gzip compressed before it gets turned into a raw byte slice πŸŽ€

input is an input directory containing the assets you wanna incorporate. and if you suffix it with /... it will be searched recursively β€” the way that just works, obsessed 🫢

the options are as follows, bestie, read them all, don't skip:

  • -debug β€” do not embed the assets, but still provide the embedding API. contents will still be loaded from disk. lowkey the "trust me bro it's temporary" mode πŸ’…
  • -nocompress β€” assets will not be GZIP compressed when this flag is specified. so like, the compression? cancelled πŸ™ˆ
  • -nomemcopy β€” use a .rodata hack to get rid of unnecessary memcopies. refer to the documentation to see what implications this carries β€” fr fr, go read it, it's important ✨
  • -pkg package β€” package name to use in the generated code. name your baby 🍼
  • -prefix prefix β€” optional path prefix to strip off asset names. bye bye, prefix πŸ‘‹
  • -o β€” name of the output file to be generated. this is where the magic lands πŸ’–
  • -tags tags β€” optional set of build tags to include. accessorize, bestie πŸŽ€

πŸ‘‘ AUTHORS πŸ‘‘

the go-bindata program was written by Jim Teeuwen. iconic behavior, we stan πŸ’œ


and that's the whole page, bestie!! this one came straight out of the Debian manual, dated January 25, 2014, filed under go-bindata(8) β€” so when you're out here embedding assets, just remember who told you πŸ§šπŸ’… ⭐