MCPcopy Create free account
hub / github.com/cli/cli / schemaFiles

Method schemaFiles

script/ghmock/checker.go:108–126  ·  view source on GitHub ↗

schemaFiles describes each schema the checker tried to load.

()

Source from the content-addressed store, hash-verified

106
107// schemaFiles describes each schema the checker tried to load.
108func (c *checker) schemaFiles() []schemaFile {
109 var files []schemaFile
110 for _, f := range []struct {
111 source schemaSource
112 file schemaFile
113 err error
114 }{
115 {graphQLSource, c.gqlFile, c.gqlErr},
116 {restSource, c.restFile, c.restErr},
117 } {
118 switch {
119 case f.err != nil:
120 files = append(files, schemaFile{Name: f.source.label, Error: f.err.Error()})
121 case f.file.SHA256 != "":
122 files = append(files, f.file)
123 }
124 }
125 return files
126}
127
128// unavailable describes each schema that couldn't be loaded.
129func (c *checker) unavailable() []string {

Callers 1

runAllFunction · 0.80

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected