Giter VIP home page Giter VIP logo

cookoo's People

Contributors

mattfarina avatar technosophos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookoo's Issues

Error with ** path matching and path: in From clause

Using:

    registry.Route("GET /hello/**", "Print Hello Web").
        Does(web.Flush, "out").
        Using("content").From("query:msg path:2 path:1")

Curl:

$ curl localhost:8080/hello/world
An internal error occurred.

Error:

error2014/06/13 16:21:19 CookooHandler trapped a panic on route 'GET /hello/**' in command 'out': runtime error: index out of range
error2014/06/13 16:21:19 Stack: goroutine 8 [running]:
github.com/Masterminds/cookoo/web.func·001()
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/web/server.go:162 +0x39a
runtime.panic(0x234100, 0x527c57)
    /usr/local/Cellar/go/1.2/libexec/src/pkg/runtime/panic.c:248 +0x106
github.com/Masterminds/cookoo/web.(*PathDatasource).Value(0xc210048d60, 0x2bd6df, 0x1, 0x628740, 0xc210048d60)
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/web/datasources.go:111 +0xae
github.com/Masterminds/cookoo.(*Router).defaultFromSources(0xc2100484a0, 0xc210048da0, 0x3, 0x3, 0x6272e0, ...)
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/router.go:248 +0x284
github.com/Masterminds/cookoo.(*Router).resolveParams(0xc2100484a0, 0xc210037e10, 0x6272e0, 0xc2100a71b0, 0xc)
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/router.go:217 +0x11f
github.com/Masterminds/cookoo.(*Router).doCommand(0xc2100484a0, 0xc210037e10, 0x6272e0, 0xc2100a71b0, 0xc21000ae20, ...)
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/router.go:206 +0x4a
github.com/Masterminds/cookoo.(*Router).runRoute(0xc2100484a0, 0x2956d0, 0xd, 0x6272e0, 0xc2100a71b0, ...)
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/router.go:165 +0x40b
github.com/Masterminds/cookoo.(*Router).HandleRequest(0xc2100484a0, 0xc210048d80, 0x10, 0x6272e0, 0xc2100a71b0, ...)
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/router.go:132 +0x256
github.com/Masterminds/cookoo/web.(*CookooHandler).ServeHTTP(0xc210048520, 0x628630, 0xc2100a1140, 0xc21009e5b0)
    /Users/mbutcher/Code/Cookoo-Web-Tutorial/.godeps/src/github.com/Masterminds/cookoo/web/server.go:185 +0x35b
net/http.(*ServeMux).ServeHTTP(0xc2100375d0, 0x628630, 0xc2100a1140, 0xc21009e5b0)
    /usr/local/Cellar/go/1.2/libexec/src/pkg/net/http/server.go:1496 +0x163
net/http.serverHandler.ServeHTTP(0xc21001e9b0, 0x628630, 0xc2100a1140, 0xc21009e5b0)
    /usr/local/Cellar/go/1.2/libexec/src/pkg/net/http/server.go:1597 +0x16e
net/http.(*conn).serve(0xc210057780)
    /usr/local/Cellar/go/1.2/libexec/src/pkg/net/http/server.go:1167 +0x7b7
created by net/http.(*Server).Serve
    /usr/local/Cellar/go/1.2/libexec/src/pkg/net/http/server.go:1644 +0x28b

URL for pulling in library

We need to figure out how to structure the Go code so that we can use a package URL to fetch the package (e.g. "github.com/masterminds/cookoo") without having to sacrifice the structure of the code package.

Context.Add should be Context.Set

Add is reserved for cases where more than one value can be added, and a context item can only have a single value.

Compare http.Headers.

CLI: Should be a datasource for getting os.Args

I should be able to access os.Args like this:

Using("foo").From("os.Args:1")

If that's not the case, then the ShiftArgs command should not throw an error if I can't shift the args N places, because we need to be able to use defaults.

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.