Documentation ¶
Index ¶
- func MemProfile()
- func NextArg(i *int, args []string) string
- func ReadInput(filenameIsCode bool, filename *string) (input string, err error)
- func SafeReadInput(filenameIsCode bool, filename *string) string
- func SafeStrToInt(str string) (i int)
- func SimplifyArgs(args []string) (r []string)
- func StartCPUProfile()
- func StopCPUProfile()
- func WriteOutputFile(output string, outputFile string, createDirs bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MemProfile ¶
func MemProfile()
MemProfile creates a memory profile if requested by environment variable.
func ReadInput ¶
ReadInput gets Jsonnet code from the given place (file, commandline, stdin). It also updates the given filename to <stdin> or <cmdline> if it wasn't a real filename.
func SafeReadInput ¶
SafeReadInput runs ReadInput, exiting the process if there was a problem.
func SafeStrToInt ¶
SafeStrToInt returns the int or exits the process.
func SimplifyArgs ¶
SimplifyArgs transforms an array of commandline arguments so that any -abc arg before the first -- (if any) are expanded into -a -b -c.
func StartCPUProfile ¶
func StartCPUProfile()
StartCPUProfile creates a CPU profile if requested by environment variable.
func StopCPUProfile ¶
func StopCPUProfile()
StopCPUProfile ensures any running CPU profile is stopped.
Types ¶
This section is empty.