mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-23 15:31:26 +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.
|
||||
|
||||
// The command line tool for running Revel apps.
|
||||
package main
|
||||
|
||||
@@ -15,12 +19,16 @@ import (
|
||||
"github.com/agtorre/gocolorize"
|
||||
)
|
||||
|
||||
// DefaultRunMode for revel's application
|
||||
const DefaultRunMode = "dev"
|
||||
|
||||
// Command structure cribbed from the genius organization of the "go" command.
|
||||
type Command struct {
|
||||
Run func(args []string)
|
||||
UsageLine, Short, Long string
|
||||
}
|
||||
|
||||
// Name returns command name from usage line
|
||||
func (cmd *Command) Name() string {
|
||||
name := cmd.UsageLine
|
||||
i := strings.Index(name, " ")
|
||||
|
||||
Reference in New Issue
Block a user