# README
Assets loaded in with IPFS
This directory contains the go-ipfs assets:
- Getting started documentation (
init-doc
). - Directory listing HTML template (
dir-index-html
git submodule).
These assets are compiled into bindata.go
with go generate
.
Re-generating
Do not edit the .go files directly.
Instead, edit the source files and use go generate
from within the
assets directory:
go generate .
Updating dir-index-html
Upstream: https://github.com/ipfs/dir-index-html
dir-index-html is a git submodule. To update, run the following commands from this directory.
> git -C dir-index-html pull
> git -C dir-index-html checkout vX.Y.Z # target version
Then, you'll need to commit the updated submodule before regenerating
bindata.go
. Otherwise, go generate
will checkout the checked-in version of
dir-index-html.
> git add dir-index-html
> git commit -m 'chore: update dir-index-html to vX.Y.Z'
Finally, re-generate the directory index HTML template, tidy, and amend the previous commit.
> go generate .
> git add bindata.go
> go mod tidy
> git commit --amend --no-edit
# Functions
Asset loads and returns the asset for the given name.
AssetDir returns the file names below a certain directory embedded in the file by go-bindata.
AssetInfo loads and returns the asset info for the given name.
AssetNames returns the names of the assets.
MustAsset is like Asset but panics when Asset would return an error.
RestoreAsset restores an asset under the given directory.
RestoreAssets restores an asset under the given directory recursively.
SeedInitDocs adds the list of embedded init documentation to the passed node, pins it and returns the root key.