~hduran-8/juju-core/trunk

« back to all changes in this revision

Viewing changes to container/interface.go

  • Committer: Tim Penhey
  • Date: 2014-03-13 01:02:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2412.
  • Revision ID: tim.penhey@canonical.com-20140313010249-rpyltx4i5gflceme
Tweak the warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        // that the host machine can run containers.
40
40
        Initialise() error
41
41
}
 
42
 
 
43
// PopValue returns the requested key from the config map. If the value
 
44
// doesn't exist, the function returns the empty string. If the value does
 
45
// exist, the value is returned, and the element removed from the map.
 
46
func (m ManagerConfig) PopValue(key string) string {
 
47
        value := m[key]
 
48
        delete(m, key)
 
49
        return value
 
50
}
 
51
 
 
52
// WarnAboutUnused emits a warning about each value in the map.
 
53
func (m ManagerConfig) WarnAboutUnused() {
 
54
        for key, value := range m {
 
55
                logger.Warningf("unused config option: %q -> %q", key, value)
 
56
        }
 
57
}