goal

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 2 Imported by: 0

README

goal

go web framework

Guide

Installation


go get github.com/xushuhui/goal

Example

package main

import (
    "net/http"
    "github.com/xushuhui/goal"
 
)

func main() {
	r := goal.Default()

	r.GET("/", func(c *Context) error {
		c.HTML(http.StatusOK, "<h1>Hello World</h1>")
		return nil
	})
	r.GET("/hello", func(c *Context) error {

		c.String(http.StatusOK, "hello %s, you're at %s\n", c.Query("name"), c.Path)
		return nil
	})
    r.Run(":8000")
}


RoadMap

  • bind
  • logging

微信公众号

扫码关注

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL