a utility to convert files to Go source code (for managing embedded assets)
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
Christopher Ramey 0bfc3ce4b0 complete rewrite, added basic documentation 4 yıl önce
README.md complete rewrite, added basic documentation 4 yıl önce
main.go complete rewrite, added basic documentation 4 yıl önce

README.md

togo

togo converts files to Go source code as a byte array. togo is based on (but is a complete rewrite of) Franco Lazzarino's togo.

usage

togo is designed to be embedded in your Go project for a dependency free way to manage assets.

First, copy main.go from togo into a subdirectory in your project (for example, a subdirectory named togo.)

Next, add comments to indicate to go generate that you wish to run your local copy of togo to build assets.

//go:generate go run ./togo -n Favicon_ico -i assets/favicon.ico -p static -o static/favicon_ico.go

togo takes some basic arguments:

Argument Description
-p generated package name
-n generated variable name
-i input file name
-o output file name