lint fixes (#14)

* lint fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-08-21 14:53:21 +03:00
committed by GitHub
parent 199ff66bd4
commit c4a303190a
42 changed files with 95 additions and 178 deletions

View File

@@ -443,7 +443,7 @@ func CheckoutSource(folder string, source *Source, secrets map[string]string) er
if !strings.Contains(repo, "https://") {
repo = "https://" + repo
}
err := gitter.Checkout(source.Repo, source.Ref)
err := gitter.Checkout(repo, source.Ref)
if err != nil {
return err
}
@@ -467,10 +467,11 @@ func extractServiceName(fileContent []byte) string {
// Uncompress is a modified version of: https://gist.github.com/mimoo/25fc9716e0f1353791f5908f94d6e726
func Uncompress(src string, dst string) error {
file, err := os.OpenFile(src, os.O_RDWR|os.O_CREATE, 0666)
defer file.Close()
if err != nil {
return err
}
defer file.Close()
// ungzip
zr, err := gzip.NewReader(file)
if err != nil {