mirror of
https://github.com/appleboy/drone-ssh.git
synced 2025-05-09 18:23:21 +08:00
hide domain if only single host in config. (#80)
* hide domain if only single host in config. Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * fix host Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> * refactor Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
efdac217bd
commit
1637772e0b
@ -40,7 +40,11 @@ type (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (p Plugin) log(host string, message ...interface{}) {
|
func (p Plugin) log(host string, message ...interface{}) {
|
||||||
fmt.Printf("%s: %s", host, fmt.Sprintln(message...))
|
if count := len(p.Config.Host); count == 1 {
|
||||||
|
fmt.Printf("%s", fmt.Sprintln(message...))
|
||||||
|
} else {
|
||||||
|
fmt.Printf("%s: %s", host, fmt.Sprintln(message...))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exec executes the plugin.
|
// Exec executes the plugin.
|
||||||
|
Loading…
Reference in New Issue
Block a user