Coder Social home page Coder Social logo

gc6's People

Contributors

smtalim avatar smtalim20 avatar spf13 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gc6's Issues

width and height flags redefinition

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.