()
| 53 | const maxSchemaSize = 200 << 20 |
| 54 | |
| 55 | func 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. |