Godzilla
A Powerful Go Full-Stack Web Framework Built For Devs
Install / Use
/learn @godzillaframework/GodzillaREADME
godzilla
About:
- A powerfull go web framework
- Fast 🚀
- Secure 🔒
- Easy Peasy :)
Features:
- Log Middleware
Installation:
go get -u github.com/godzillaframework/godzilla
Examples:
- a simple api
package main
import "github.com/godzillaframework/godzilla"
func main() {
gz := godzilla.New()
gz.Get("/index", func(ctx godzilla.Context) {
ctx.SendString("Hello EveryOne!!!")
})
gz.Start(":9090")
}
- params
package main
import "github.com/godzillaframework/godzilla"
func main() {
gz := godzilla.New()
gz.Get("/users/:user", func(ctx godzilla.Context) {
ctx.SendString(ctx.Param("user"))
})
gz.Start(":8080")
}
- static files
package main
import "github.com/godzillaframework/godzilla"
func main() {
gz := godzilla.New()
gz.Static("/imgs", "./images")
/* go to localhost:8080/imgs/image.png */
gz.Start(":8080")
}
middleware:
- Log middleware:
package main
import (
"log"
"github.com/godzillaframework/godzilla"
)
func main() {
gz := godzilla.New()
logMiddleware := func(ctx godzilla.Context) {
log.Printf("log message!")
ctx.Next()
}
gz.Use(logMiddleware)
gz.Start(":8080")
- Unauthorized middleware:
package main
import (
"log"
"github.com/godzillaframework/godzilla"
)
func main() {
gz := godzilla.New()
unAuthorizedMiddleware := func(ctx godzilla.Context) {
ctx.Status(godzilla.StatusUnauthorized).SendString("You are unauthorized to access this page!")
}
gz.Get("/hello", func(ctx godzilla.Context) {
ctx.SendString("Hello World!")
})
gz.Get("/protected", unAuthorizedMiddleware, func(ctx godzilla.Context) {
ctx.SendString("You accessed a protected page")
})
gz.Start(":8080")
}
Related Skills
node-connect
351.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
351.4kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
110.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
