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

Function schemaCacheDir

script/ghmock/schemafiles.go:55–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53const maxSchemaSize = 200 << 20
54
55func schemaCacheDir() (string, error) {
56 base, err := userCacheDir()
57 if err != nil {
58 return "", fmt.Errorf("finding the cache folder: %w", err)
59 }
60 return filepath.Join(base, "ghmock"), nil
61}
62
63// locate returns the schema file to use: the file named by the environment
64// variable, a cached copy, or a fresh download into the cache.

Callers 1

cachePathMethod · 0.85

Calls 2

JoinMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected