From 28e050c14e834473221d3c7f6d4abcf14a3ba7a8 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 7 Jun 2014 18:00:36 +0400 Subject: [PATCH] Fix style warnings. --- deb/publish.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/deb/publish.go b/deb/publish.go index 3b8befda..564c6c55 100644 --- a/deb/publish.go +++ b/deb/publish.go @@ -366,18 +366,16 @@ func (p *PublishedRepo) Decode(input []byte) error { func (p *PublishedRepo) GetOrigin() string { if p.Origin == "" { return p.Prefix + " " + p.Distribution - } else { - return p.Origin } + return p.Origin } // GetLabel returns default or manual Label: func (p *PublishedRepo) GetLabel() string { if p.Label == "" { return p.Prefix + " " + p.Distribution - } else { - return p.Label } + return p.Label } // Publish publishes snapshot (repository) contents, links package files, generates Packages & Release files, signs them @@ -553,7 +551,8 @@ func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorage relativePath = filepath.Join(component, fmt.Sprintf("binary-%s", arch), "Release") } - file, err := publishedStorage.CreateFile(filepath.Join(basePath, relativePath+suffix)) + var file *os.File + file, err = publishedStorage.CreateFile(filepath.Join(basePath, relativePath+suffix)) if err != nil { return fmt.Errorf("unable to create Release file: %s", err) }