codegangsta / gin

Live reload utility for Go web servers
MIT License
4.23k stars 317 forks source link

Broken build #169

Closed buu700 closed 2 years ago

buu700 commented 2 years ago

Attempting to install from the latest code fails:

gibson@3e8c8777a5ec:~$ go version
go version go1.15.9 linux/arm64
gibson@3e8c8777a5ec:~$ go get -u github.com/codegangsta/gin
# github.com/codegangsta/gin
go/src/github.com/codegangsta/gin/main.go:40:13: cannot use MainAction (type func(*cli.Context)) as type cli.ActionFunc in assignment
go/src/github.com/codegangsta/gin/main.go:42:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
    cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/codegangsta/gin/main.go:45:4: unknown field 'EnvVar' in struct literal of type cli.StringFlag
go/src/github.com/codegangsta/gin/main.go:48:14: cannot use cli.IntFlag literal (type cli.IntFlag) as type cli.Flag in slice literal:
    cli.IntFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/codegangsta/gin/main.go:51:4: unknown field 'EnvVar' in struct literal of type cli.IntFlag
go/src/github.com/codegangsta/gin/main.go:54:14: cannot use cli.IntFlag literal (type cli.IntFlag) as type cli.Flag in slice literal:
    cli.IntFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/codegangsta/gin/main.go:57:4: unknown field 'EnvVar' in struct literal of type cli.IntFlag
go/src/github.com/codegangsta/gin/main.go:60:17: cannot use cli.StringFlag literal (type cli.StringFlag) as type cli.Flag in slice literal:
    cli.StringFlag does not implement cli.Flag (Apply method has pointer receiver)
go/src/github.com/codegangsta/gin/main.go:63:4: unknown field 'EnvVar' in struct literal of type cli.StringFlag
go/src/github.com/codegangsta/gin/main.go:69:4: unknown field 'EnvVar' in struct literal of type cli.StringFlag
go/src/github.com/codegangsta/gin/main.go:69:4: too many errors

However, installing my fork of the previous version works as expected (https://github.com/buu700/gin).

Wowo10 commented 2 years ago

I have also experienced this. Is the author going to fix the build?

vmangwani commented 2 years ago

Is this being fixed?

rochinworks commented 2 years ago

There are forks that use the go.mod version of build this or you can build locally by doing a go mod init, changing the dependency in main.go and building the binary locally as an interim solution.

buu700 commented 2 years ago

Update: switching to go install github.com/codegangsta/gin@latest with Go 1.18 works for me.