WriteFile writes a Glide lock file. This is a convenience function that marshals the YAML and then writes it to the given file. If the file exists, it will be clobbered.
(lockpath string)
| 73 | // This is a convenience function that marshals the YAML and then writes it to |
| 74 | // the given file. If the file exists, it will be clobbered. |
| 75 | func (lf *Lockfile) WriteFile(lockpath string) error { |
| 76 | o, err := lf.Marshal() |
| 77 | if err != nil { |
| 78 | return err |
| 79 | } |
| 80 | return ioutil.WriteFile(lockpath, o, 0666) |
| 81 | } |
| 82 | |
| 83 | // Clone returns a clone of Lockfile |
| 84 | func (lf *Lockfile) Clone() *Lockfile { |
no test coverage detected