launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/agent/export_test.go (about) 1 // Copyright 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package agent 5 6 func Password(config Config) string { 7 c := config.(*configInternal) 8 if c.stateDetails == nil { 9 return c.apiDetails.password 10 } else { 11 return c.stateDetails.password 12 } 13 return "" 14 } 15 16 func WriteNewPassword(cfg Config) (string, error) { 17 return cfg.(*configInternal).writeNewPassword() 18 }