MCPcopy Create free account
hub / github.com/stretchr/testify / outputFile

Function outputFile

_codegen/main.go:119–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117}
118
119func outputFile() (*os.File, error) {
120 filename := *out
121 if filename == "-" || (filename == "" && *tmplFile == "") {
122 return os.Stdout, nil
123 }
124 if filename == "" {
125 filename = strings.TrimSuffix(strings.TrimSuffix(*tmplFile, ".tmpl"), ".go") + ".go"
126 }
127 return os.Create(filename)
128}
129
130// analyzeCode takes the types scope and the docs and returns the import
131// information and information about all the assertion functions.

Callers 1

generateCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected