masterminds / cookoo Goto Github PK
View Code? Open in Web Editor NEWA chain-of-command framework written in Go
Home Page: http://masterminds.github.io/cookoo/
License: Other
A chain-of-command framework written in Go
Home Page: http://masterminds.github.io/cookoo/
License: Other
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
A model similar to Pronto as opposed to the model used in Fortissimo.
This will help when doing things like 12 factor
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.
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.
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.
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.