cmd/koji: add error handling to logout
otherwise, the linter complains
This commit is contained in:
parent
87a7e90c98
commit
a1c578c8d1
1 changed files with 7 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -48,7 +49,12 @@ func main() {
|
||||||
println(err.Error())
|
println(err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer k.Logout()
|
defer func() {
|
||||||
|
err := k.Logout()
|
||||||
|
if err != nil {
|
||||||
|
log.Print("logging out of koji failed ", err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
hash, length, err := k.Upload(file, dir, path.Base(filename))
|
hash, length, err := k.Upload(file, dir, path.Base(filename))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue