mattupstate / goes

A proof of concept for a simple URL routing API with Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Goes

A proof of concept for a simple URL routing API with Go

Example code:

package main

import (
    "fmt"
    "github.com/mattupstate/goes"
)

func home() string {
    return "Hello World"
}

func products(a struct{Category string}) string {
    return fmt.Sprintf("The product category is %s", a.Category)
}

func main() {
    app := goes.App{}
    app.Route("/", home)
    app.Route("/products/{Category}", products)
    app.Run("0.0.0.0", 8080)
}

About

A proof of concept for a simple URL routing API with Go


Languages

Language:Go 100.0%