MCPcopy
hub / github.com/stretchr/testify / outputFile

Function outputFile

_codegen/main.go:118–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

generateCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected