Skip to content

Ruisi-Lu/gin-gonic-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang Gin-gonic framework 學習筆記

專案結構

gin-gonic-demo/
|- mian.go
|- handlers
  |- hello.go
  |- login.go
|- router
  |- router.go
|- .gitignore
|- readme.md
|- go.mod

How to use

Swagger API docs

每次調整都需要init一次

swag init

一般運行

go run main.go

Hot reload

https://github.com/cosmtrek/air

Installation

on macOS
curl -fLo ~/.air \
    https://raw.githubusercontent.com/cosmtrek/air/master/bin/darwin/air
chmod +x ~/.air
on Linux
curl -fLo ~/.air \
    https://raw.githubusercontent.com/cosmtrek/air/master/bin/linux/air
chmod +x ~/.air
on Windows
curl -fLo ~/.air.exe \
    https://raw.githubusercontent.com/cosmtrek/air/master/bin/windows/air.exe
Run
 ./air

About

Golang gin-gonic framework demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages