()
| 47 | } |
| 48 | |
| 49 | func (gohanClientCLI *GohanClientCLI) setCachedSchemas() error { |
| 50 | cache := Cache{ |
| 51 | Expire: time.Now().Add(gohanClientCLI.opts.cacheTimeout), |
| 52 | Schemas: gohanClientCLI.schemas, |
| 53 | } |
| 54 | rawCache, _ := json.Marshal(cache) |
| 55 | err := ioutil.WriteFile(gohanClientCLI.opts.cachePath, rawCache, os.ModePerm) |
| 56 | if err != nil { |
| 57 | return err |
| 58 | } |
| 59 | return nil |
| 60 | } |
no test coverage detected