From 04a10f2acd73d88f90433755bfbe667c5174acb5 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Mon, 13 Jun 2022 21:20:17 +0200 Subject: ref: Rename snake case variable My pythonic brain kicked in and I ended up naming a variable using snake case. --- controller/controller.go | 2 +- db/model.go | 8 ++++---- templates/entry.tmpl | 2 +- templates/index.tmpl | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/controller/controller.go b/controller/controller.go index 3552304..ffa89ce 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -42,7 +42,7 @@ func CreateEntry(c *gin.Context) { var entry db.YdlEntry c.ShouldBind(&entry) db.DB.Create(&entry) - spawnWorker(entry.Link, entry.Output_folder) + spawnWorker(entry.Link, entry.OutputFolder) c.Redirect(http.StatusFound, "/") } diff --git a/db/model.go b/db/model.go index 3094472..6f35cd0 100644 --- a/db/model.go +++ b/db/model.go @@ -4,8 +4,8 @@ import "gorm.io/gorm" type YdlEntry struct { gorm.Model - Title string - Link string - Format string - Output_folder string + Title string + Link string + Format string + OutputFolder string } diff --git a/templates/entry.tmpl b/templates/entry.tmpl index dc5f2b6..642b501 100644 --- a/templates/entry.tmpl +++ b/templates/entry.tmpl @@ -16,7 +16,7 @@ diff --git a/templates/index.tmpl b/templates/index.tmpl index 1880b5f..0b965f5 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -14,7 +14,7 @@ {{ .ID }} {{ .Link }} - {{ .Output_folder }} + {{ .OutputFolder }} Edit -- cgit v1.2.3