summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-04-10 21:29:42 +0200
committerJakob Unterwurzacher2016-04-10 21:31:15 +0200
commitbd5405189eb27d463e25c43691b19dbdf174d3a8 (patch)
treea78d909a5fac9b3c642ea5c1a715a08bffa54965 /main.go
parentbd1f17ca9f210b318e28d7ed233698b950d564b8 (diff)
Fix "go tool vet -shadow=true" warnings
Among those one real bug.
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/main.go b/main.go
index ef93440..f7d53ae 100644
--- a/main.go
+++ b/main.go
@@ -224,7 +224,8 @@ func main() {
// "-cpuprofile"
if args.cpuprofile != "" {
toggledlog.Info.Printf("Writing CPU profile to %s", args.cpuprofile)
- f, err := os.Create(args.cpuprofile)
+ var f *os.File
+ f, err = os.Create(args.cpuprofile)
if err != nil {
fmt.Println(err)
os.Exit(ERREXIT_INIT)
@@ -235,7 +236,8 @@ func main() {
// "-memprofile"
if args.memprofile != "" {
toggledlog.Info.Printf("Writing mem profile to %s", args.memprofile)
- f, err := os.Create(args.memprofile)
+ var f *os.File
+ f, err = os.Create(args.memprofile)
if err != nil {
fmt.Println(err)
os.Exit(ERREXIT_INIT)