mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-22 23:15:18 +00:00
revel/revel#1057 code improvements docs, errcheck, cyclo, etc
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
// Copyright (c) 2012-2016 The Revel Framework Authors, All rights reserved.
|
||||
// Revel Framework source code and usage is governed by a MIT style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -38,7 +42,7 @@ func packageApp(args []string) {
|
||||
}
|
||||
|
||||
// Determine the run mode.
|
||||
mode := "dev"
|
||||
mode := DefaultRunMode
|
||||
if len(args) >= 2 {
|
||||
mode = args[1]
|
||||
}
|
||||
@@ -48,7 +52,9 @@ func packageApp(args []string) {
|
||||
|
||||
// Remove the archive if it already exists.
|
||||
destFile := filepath.Base(revel.BasePath) + ".tar.gz"
|
||||
os.Remove(destFile)
|
||||
if err := os.Remove(destFile); err != nil && !os.IsNotExist(err) {
|
||||
revel.ERROR.Fatal(err)
|
||||
}
|
||||
|
||||
// Collect stuff in a temp directory.
|
||||
tmpDir, err := ioutil.TempDir("", filepath.Base(revel.BasePath))
|
||||
|
||||
Reference in New Issue
Block a user