We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import( "crypto/md5" "fmt" "github.com/beego/beego/v2/client/orm" "github.com/beego/beego/v2/core/validation" beego "github.com/beego/beego/v2/server/web" "log" "github.com/astaxie/beego/cache" captcha2 "github.com/astaxie/beego/utils/captcha" ) func init() { // use beego cache system store the captcha data store := cache.NewMemoryCache() cpt = captcha2.NewWithFilter("/captcha/", store) }
会出现以下错误: ./Netdisk flag redefined: graceful panic: ./Netdisk flag redefined: graceful
goroutine 1 [running]: flag.(*FlagSet).Var(0xc000172660, 0xee0f40, 0x14d5188, 0xdaa5ef, 0x8, 0xdc1691, 0x21) /usr/lib/go-1.13/src/flag/flag.go:848 +0x4ae flag.BoolVar(...) /usr/lib/go-1.13/src/flag/flag.go:627
似乎是因为在flag.go和grace.go中重复定义了flag变量,但这两个变量是依赖包中所定义的,请问应当如何解决?
The text was updated successfully, but these errors were encountered:
你不能使用"github.com/astaxie/beego/cache"。你应该用"github.com/beego/beego/server/web/filter/cacha"。大概是在这个位置。 你这里是v1.x和v2.x混用,会有很多问题。我建议你直接删掉github.com/astaxie/beego依赖
github.com/astaxie/beego
Sorry, something went wrong.
No branches or pull requests
import(
"crypto/md5"
"fmt"
"github.com/beego/beego/v2/client/orm"
"github.com/beego/beego/v2/core/validation"
beego "github.com/beego/beego/v2/server/web"
"log"
"github.com/astaxie/beego/cache"
captcha2 "github.com/astaxie/beego/utils/captcha"
)
func init() {
// use beego cache system store the captcha data
store := cache.NewMemoryCache()
cpt = captcha2.NewWithFilter("/captcha/", store)
}
会出现以下错误:
./Netdisk flag redefined: graceful
panic: ./Netdisk flag redefined: graceful
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc000172660, 0xee0f40, 0x14d5188, 0xdaa5ef, 0x8, 0xdc1691, 0x21)
/usr/lib/go-1.13/src/flag/flag.go:848 +0x4ae
flag.BoolVar(...)
/usr/lib/go-1.13/src/flag/flag.go:627
似乎是因为在flag.go和grace.go中重复定义了flag变量,但这两个变量是依赖包中所定义的,请问应当如何解决?
The text was updated successfully, but these errors were encountered: