package
0.0.0-20230427072909-755c21686326
Repository: https://github.com/jobergner/backent-cli.git
Documentation: pkg.go.dev

# README

ABOUT

This script generates a .go file with strings of all declarations within a go package.

MOTIVATION

idk maybe ill need this

USAGE

go run main.go -input code/ -output ./stringified_decls.go

INPUT

code/main.go

package main
  
import "fmt"
  
func main() {
    fmt.Println(add(1, 2))
}         

code/helpers.go

package main

func add(n1, n2 int) int {
    return n1 + n2
}

OUTPUT

./stringified_decls.go

package main

const main_import string = `import "fmt"`
const main_func string = `func main() {
    fmt.Println(add(1, 2))
}`
const add_func string = `func add(n1, n2 int) int {
    return n1 + n2
}

FLAGS

flagusagedefault
inputpoint to package to stringify./
outputpoint to location of output file./stringified_decls.go
packagedefine package name of output filemain
prefixdefine prefix for declarations in output file""
excluderegular expression to match files to excludematches nothing
includeregular expression to match files to includematches everything
onlystring to equal the only file to include (eg. "main.go")is ingored