27 lines
386 B
Go

package main
import (
"net/http"
"github.com/gin-gonic/gin"
)
type salesDetails struct {
Id string
Name string
Amount int64
Price float32
SalesAmount int64
}
func main() {
router := gin.Default()
router.GET("/", getHelloWorld)
router.Run("localhost:8080")
}
func getHelloWorld(c *gin.Context) {
c.IndentedJSON(http.StatusOK, "Hello world")
}