无法安装revel framework form Go

无法安装revel framework form Go,go,revel,Go,Revel,我试图安装。我遵循了文档中给出的所有步骤,但每当我试图运行Revel命令时,它就会抛出恐慌错误。 以下是我正在执行的步骤 环境路径: export GOROOT=/usr/local/go export GOPATH=/Users/<username>/Desktop/gocode export PATH="/Users/<username>/gocode/bin:$PATH" 当我运行revel版本时,它显示: panic: runtime error: slice

我试图安装。我遵循了文档中给出的所有步骤,但每当我试图运行Revel命令时,它就会抛出恐慌错误。 以下是我正在执行的步骤 环境路径:

export GOROOT=/usr/local/go
export GOPATH=/Users/<username>/Desktop/gocode
export PATH="/Users/<username>/gocode/bin:$PATH"
当我运行revel版本时,它显示:

panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/revel/cmd/model.(*CommandConfig).UpdateImportPath(0xc4200961c0, 0x20)
    /Users/amitsharma/Desktop/gocode/src/github.com/revel/cmd/model/command_config.go:122 +0x907
main.main()
    /Users/amitsharma/Desktop/gocode/src/github.com/revel/cmd/revel/revel.go:133 +0x243
当我跑的时候

revel run -a my-app
它表明

ERROR 19:34:59 harness.go:231: Could not start application              error="revel/harness: app died reason: exit status 2"
INFO  19:34:59 watcher.go:272: Watcher: Recording error last build, setting rebuild on error="App failed to start up: revel/harness: app died reason: exit status 2"
INFO  19:34:59 watcher.go:277: Rebuilt, result                          error="App failed to start up: revel/harness: app died reason: exit status 2"
我的围棋版本

go version go1.10.3 darwin/amd64
我的围棋

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/amitsharma/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/<username>/Desktop/gocode"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/0d/pkfrs5cj0v57xgsnwvb2kb580000gn/T/go-build028697826=/tmp/go-build -gno-record-gcc-switches -fno-common"
GOARCH=“amd64”
戈宾=“”
GOCACHE=“/Users/amitsharma/Library/Caches/go build”
GOEXE=“”
GOHOSTARCH=“amd64”
GOHOSTOS=“达尔文”
GOOS=“达尔文”
GOPATH=“/Users//Desktop/gocode”
GORACE=“”
GOROOT=“/usr/local/go”
GOTMPDIR=“”
GOTOOLDIR=“/usr/local/go/pkg/tool/darwin_amd64”
GCCGO=“GCCGO”
CC=“叮当声”
CXX=“铿锵++”
CGO_ENABLED=“1”
CGO_CFLAGS=“-g-O2”
CGO_CPPFLAGS=“”
CGO_cxflags=“-g-O2”
CGO_FFLAGS=“-g-O2”
CGO_LDFLAGS=“-g-O2”
PKG_CONFIG=“PKG CONFIG”
GOGCCFLAGS=“-fPIC-m64-pthread-fno插入诊断-使用的参数-fmessage length=0-fdebug prefix map=/var/folders/0d/pkfrs5cj0v57xgsnwvb2kb58000gn/T/go-build028697826=/tmp/go-build-gno-record gcc开关-fno common”

尝试重新安装revel

以下是我如何尝试的,它对我有效

  • 设置go路径($GOPATH):
  • 安装revel&cmd:
  • 将revel cmd链接到bin目录。因此该命令可以执行
  • 检查revel是否工作。只需在命令行中键入
    revel
  • 输出如下所示

        Usage:
          revel [OPTIONS] <command>
    
        Application Options:
          -v, --debug              If set the logger is set to verbose
              --historic-run-mode  If set the runmode is passed a string not json
          -X, --build-flags=       These flags will be used when building the application. May be specified multiple times, only applicable for Build, Run,
                                   Package, Test commands
    
        Available commands:
          build
          clean
          new
          package
          run
          test
          version
    
    输出

        Revel executing: displays the Revel Framework and Go version
        Revel Framework :   0.21.0  (0.21.0 remote master branch)
        Revel Cmd   :   0.21.1  (0.21.1 remote master branch)
        Revel Modules   :   0.21.0  (0.21.0 remote master branch)
    
  • 现在,您可以使用命令创建第一个项目
  • 输出

        Revel executing: create a skeleton Revel application
        Your application has been created in:
           /var/projects/go/src/myapp
    
        You can run it with:
        revel run -a  myapp
    

    目前这似乎是Revel的一个已知问题:,现在Revel团队已经解决了这个问题。框架创建者解决了这个问题,感谢您的努力。
    export PATH="$PATH:$GOPATH/bin
    
        Usage:
          revel [OPTIONS] <command>
    
        Application Options:
          -v, --debug              If set the logger is set to verbose
              --historic-run-mode  If set the runmode is passed a string not json
          -X, --build-flags=       These flags will be used when building the application. May be specified multiple times, only applicable for Build, Run,
                                   Package, Test commands
    
        Available commands:
          build
          clean
          new
          package
          run
          test
          version
    
    revel version
    
        Revel executing: displays the Revel Framework and Go version
        Revel Framework :   0.21.0  (0.21.0 remote master branch)
        Revel Cmd   :   0.21.1  (0.21.1 remote master branch)
        Revel Modules   :   0.21.0  (0.21.0 remote master branch)
    
    revel new myapp
    
        Revel executing: create a skeleton Revel application
        Your application has been created in:
           /var/projects/go/src/myapp
    
        You can run it with:
        revel run -a  myapp