A core web framework via Golang
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
main
LICENSE
README.md
context.go
duck.go
inject.go
logger.go
route.go
static.go

README.md

Duck

Duck is a simple but powerful package for learning how to write modular web applications/services in Golang.

Notice: Duck is still in the design stage. It's not working yet. Stay tuned.

Getting Started

After installing Go and setting up your GOPATH, and then

go get github.com/zddhub/duck

How to use

You can use Duck like this:

package main

import "github.com/zddhub/duck"

func main() {
  d := duck.Incubate()

  d.Get("/", func() string {
    return "Hello world!"
  })

  d.Run()
}

Then run your server: You will now have a Duck webserver running on localhost:3030

You can run more complex case:

go run main/main.go

Getting Help

You can read the follow blog to learn more:

About

Inspired by Martini