Skip to content

Commit 03e7763

Browse files
Copilotnomeguy
andcommitted
Fix gofumpt formatting issues in Go files
Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
1 parent ba7e2b5 commit 03e7763

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func main() {
1818
AllowCredentials: true,
1919
}))
2020

21-
//beego.DelStaticPath("/static")
21+
// beego.DelStaticPath("/static")
2222
beego.SetStaticPath("/static", "web/build/static")
2323
// https://studygolang.com/articles/2303
2424
beego.InsertFilter("/", beego.BeforeRouter, routers.TransparentStatic) // must has this for default page

object/dataset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func UpdateDataset(id string, dataset *Dataset) bool {
8585
panic(err)
8686
}
8787

88-
//return affected != 0
88+
// return affected != 0
8989
return true
9090
}
9191

routers/router.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ func init() {
1111
}
1212

1313
func initAPI() {
14-
ns :=
15-
beego.NewNamespace("/api",
16-
beego.NSInclude(
17-
&controllers.ApiController{},
18-
),
19-
)
14+
ns := beego.NewNamespace("/api",
15+
beego.NSInclude(
16+
&controllers.ApiController{},
17+
),
18+
)
2019
beego.AddNamespace(ns)
2120

2221
beego.Router("/api/signin", &controllers.ApiController{}, "POST:Signin")

util/json.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "encoding/json"
44

55
func StructToJson(v interface{}) string {
66
data, err := json.MarshalIndent(v, "", " ")
7-
//data, err := json.Marshal(v)
7+
// data, err := json.Marshal(v)
88
if err != nil {
99
panic(err)
1010
}

util/string.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func ReadStringFromPath(path string) string {
8888
}
8989

9090
func WriteStringToPath(s string, path string) {
91-
err := ioutil.WriteFile(path, []byte(s), 0644)
91+
err := ioutil.WriteFile(path, []byte(s), 0o644)
9292
if err != nil {
9393
panic(err)
9494
}
@@ -104,7 +104,7 @@ func ReadBytesFromPath(path string) []byte {
104104
}
105105

106106
func WriteBytesToPath(b []byte, path string) {
107-
err := ioutil.WriteFile(path, b, 0644)
107+
err := ioutil.WriteFile(path, b, 0o644)
108108
if err != nil {
109109
panic(err)
110110
}

0 commit comments

Comments
 (0)