fn

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 8 Imported by: 0

README

fn

Using GIN in AWS Lambda

package main

import (
	"github.com/StevenZack/fn"
	"github.com/gin-gonic/gin"
)

func main() {
	gin.SetMode(gin.ReleaseMode)
	r := fn.Default()
	r.GET("/", func(c *gin.Context) {
		m := gin.H{}
		for k := range c.Request.Header {
			m[k] = c.GetHeader(k)
		}
		c.JSON(200, m)
	})
	r.Run()
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(serveMux http.Handler) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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