MCPcopy Create free account
hub / github.com/Masterminds/glide / writeLock

Function writeLock

action/get.go:101–113  ·  view source on GitHub ↗
(conf, confcopy *cfg.Config, base string)

Source from the content-addressed store, hash-verified

99}
100
101func writeLock(conf, confcopy *cfg.Config, base string) {
102 hash, err := conf.Hash()
103 if err != nil {
104 msg.Die("Failed to generate config hash. Unable to generate lock file.")
105 }
106 lock, err := cfg.NewLockfile(confcopy.Imports, confcopy.DevImports, hash)
107 if err != nil {
108 msg.Die("Failed to generate lock file: %s", err)
109 }
110 if err := lock.WriteFile(filepath.Join(base, gpath.LockFile)); err != nil {
111 msg.Die("Failed to write glide lock file: %s", err)
112 }
113}
114
115// addPkgsToConfig adds the given packages to the config file.
116//

Callers 2

RemoveFunction · 0.70
GetFunction · 0.70

Calls 3

WriteFileMethod · 0.95
HashMethod · 0.80
DieMethod · 0.80

Tested by

no test coverage detected