f-15: error: add error handle
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
40b29657ae
commit
825fabb64a
2 changed files with 27 additions and 9 deletions
|
|
@ -35,15 +35,19 @@ func main() {
|
|||
defer db.Close()
|
||||
|
||||
if *start {
|
||||
metadata.StartMetadata(metadata.NoCloudConfig{
|
||||
if err := metadata.StartMetadata(metadata.NoCloudConfig{
|
||||
VpcName: *vpc,
|
||||
Name: *vm_name,
|
||||
BindIP: *bind_ip,
|
||||
BindPort: *bind_port,
|
||||
Password: *password,
|
||||
SSHKEY: *ssh_key,
|
||||
}, db, *dryrun)
|
||||
}, db, *dryrun); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
} else if *stop {
|
||||
metadata.StopMetadata(*vm_name, db, *dryrun)
|
||||
if err := metadata.StopMetadata(*vm_name, db, *dryrun); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue