aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/customer/controller.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-12 23:30:08 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-12 23:30:08 +0530
commit327a32f563394f92313e4a751515d69d90f4e7f5 (patch)
tree9b49fd41ac852fa459b623f7fbe7c79aaac24418 /customer/controller.go
parent029fe2c7a3532bc3bf435f257cdade240c8f3568 (diff)
formatted code
Diffstat (limited to 'customer/controller.go')
-rw-r--r--customer/controller.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/customer/controller.go b/customer/controller.go
index 83423da..b9b2b25 100644
--- a/customer/controller.go
+++ b/customer/controller.go
@@ -18,13 +18,13 @@
package customer
import (
- e "vidhukant.com/openbills/errors"
"github.com/gin-gonic/gin"
"net/http"
"strconv"
+ e "vidhukant.com/openbills/errors"
)
-func handleGetSingleCustomer (ctx *gin.Context) {
+func handleGetSingleCustomer(ctx *gin.Context) {
id, err := strconv.ParseUint(ctx.Param("id"), 10, 64)
if err != nil {
ctx.Error(e.ErrInvalidID)
@@ -44,7 +44,7 @@ func handleGetSingleCustomer (ctx *gin.Context) {
})
}
-func handleGetCustomers (ctx *gin.Context) {
+func handleGetCustomers(ctx *gin.Context) {
var customers []Customer
err := getCustomers(&customers)
@@ -59,7 +59,7 @@ func handleGetCustomers (ctx *gin.Context) {
})
}
-func handleSaveCustomer (ctx *gin.Context) {
+func handleSaveCustomer(ctx *gin.Context) {
var customer Customer
ctx.Bind(&customer)
@@ -75,7 +75,7 @@ func handleSaveCustomer (ctx *gin.Context) {
})
}
-func handleDelCustomer (ctx *gin.Context) {
+func handleDelCustomer(ctx *gin.Context) {
id, err := strconv.ParseUint(ctx.Param("id"), 10, 64)
if err != nil {
ctx.Error(e.ErrInvalidID)