MCPcopy
hub / github.com/sqlc-dev/sqlc / findSchema

Function findSchema

internal/endtoend/vet_test.go:19–29  ·  view source on GitHub ↗
(t *testing.T, path string)

Source from the content-addressed store, hash-verified

17)
18
19func findSchema(t *testing.T, path string) (string, bool) {
20 schemaFile := filepath.Join(path, "schema.sql")
21 if _, err := os.Stat(schemaFile); !os.IsNotExist(err) {
22 return schemaFile, true
23 }
24 schemaDir := filepath.Join(path, "schema")
25 if _, err := os.Stat(schemaDir); !os.IsNotExist(err) {
26 return schemaDir, true
27 }
28 return "", false
29}
30
31func TestExamplesVet(t *testing.T) {
32 t.Parallel()

Callers 1

TestExamplesVetFunction · 0.85

Calls 1

JoinMethod · 0.45

Tested by

no test coverage detected