launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/environs/sshstorage/error.go (about) 1 // Copyright 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package sshstorage 5 6 import ( 7 "fmt" 8 ) 9 10 type SSHStorageError struct { 11 Output string 12 ExitCode int 13 } 14 15 func (e SSHStorageError) Error() string { 16 if e.Output == "" { 17 return fmt.Sprintf("exit code %d", e.ExitCode) 18 } 19 return e.Output 20 }