golangchallenge / gc6 Goto Github PK
View Code? Open in Web Editor NEWPublic repo for Sept. 2015 challenge
Public repo for Sept. 2015 challenge
In my initial debugging, I found that errors are not correctly reported from the /move/direction
endpoint. I suspect there should be a return statement at https://github.com/golangchallenge/gc6/blob/master/commands/daedalus.go#L146
Hi, thank you for the exciting challenge! I'm enjoying it so much :)
But I have a problem. When I run daedalus
command the following panic occurs:
$ go run main.go daedalus
panic: shorthand redefinition
goroutine 1 [running]:
github.com/spf13/pflag.(*FlagSet).AddFlag(0xc820150400, 0xc82007c870)
/Users/soshi/src/github.com/spf13/pflag/flag.go:545 +0xcae
github.com/spf13/cobra.(*Command).mergePersistentFlags.func2.2(0xc82007c870)
/Users/soshi/src/github.com/spf13/cobra/command.go:1069 +0x7d
github.com/spf13/pflag.(*FlagSet).VisitAll(0xc820150500, 0xc820111b38)
/Users/soshi/src/github.com/spf13/pflag/flag.go:234 +0x85
github.com/spf13/cobra.(*Command).mergePersistentFlags.func2(0x7cea60)
/Users/soshi/src/github.com/spf13/cobra/command.go:1071 +0xbd
github.com/spf13/cobra.(*Command).mergePersistentFlags.func2(0x7ce6e0)
/Users/soshi/src/github.com/spf13/cobra/command.go:1074 +0xed
github.com/spf13/cobra.(*Command).mergePersistentFlags(0x7ce6e0)
/Users/soshi/src/github.com/spf13/cobra/command.go:1078 +0x28e
github.com/spf13/cobra.(*Command).ParseFlags(0x7ce6e0, 0x7fa1c0, 0x0, 0x0, 0x0, 0x0)
/Users/soshi/src/github.com/spf13/cobra/command.go:1033 +0x2f
github.com/spf13/cobra.(*Command).execute(0x7ce6e0, 0x7fa1c0, 0x0, 0x0, 0x0, 0x0)
/Users/soshi/src/github.com/spf13/cobra/command.go:466 +0x2a2
github.com/spf13/cobra.(*Command).Execute(0x7cea60, 0x0, 0x0)
/Users/soshi/src/github.com/spf13/cobra/command.go:593 +0x46a
github.com/golangchallenge/gc6/commands.Execute()
/Users/soshi/src/github.com/golangchallenge/gc6/commands/labyrinth.go:105 +0x27
main.main()
/Users/soshi/src/github.com/golangchallenge/gc6/main.go:25 +0x14
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.5/libexec/src/runtime/asm_amd64.s:1696 +0x1
goroutine 5 [syscall]:
os/signal.loop()
/usr/local/Cellar/go/1.5/libexec/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/Cellar/go/1.5/libexec/src/os/signal/signal_unix.go:28 +0x37
exit status 2
I think https://github.com/golangchallenge/gc6/blob/master/commands/labyrinth.go#L72-L73 and https://github.com/golangchallenge/gc6/blob/master/commands/daedalus.go#L69-L70 conflict and cause the above panic (commenting out the latter two lines works fine).
Is this a bug or an intended behavior? Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.