Skip to content

Generates a Go file containing the given files as strings

Notifications You must be signed in to change notification settings

bouk/file2const

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

file2const

Generates a Go file containing the given files as strings. Useful for packaging in static files.

Usage: file2const <flags> [<inputFile:constantName>] <outputFile.go>
  -package="": name of package to give to file. Default to directory name

Given a file like follows:

console.log("HEY")

This command: file2const --package="example" file.js:value out.go

Will write the following to out.go

package example

const (
	value = "console.log(\"HEY\")\n"
)

About

Generates a Go file containing the given files as strings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages