diff options
| author | Shulhan <ms@kilabit.info> | 2022-08-01 20:31:25 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-08-01 20:39:38 +0700 |
| commit | f0be5f35c325da2aebea6e0d98f035ad23dc3019 (patch) | |
| tree | 270513ab0d9872a9b30b799ad084a181378fbad1 /cmd/ciigo-example | |
| parent | 0a9e6c793dc1d91d71db6838e2c45adecc6aae92 (diff) | |
| download | ciigo-f0be5f35c325da2aebea6e0d98f035ad23dc3019.tar.xz | |
all: clean up codes
Replace any usage of ":=" with explicit variable declaration for better
types clarity.
Diffstat (limited to 'cmd/ciigo-example')
| -rw-r--r-- | cmd/ciigo-example/main.go | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cmd/ciigo-example/main.go b/cmd/ciigo-example/main.go index 9329dfe..0eeb52c 100644 --- a/cmd/ciigo-example/main.go +++ b/cmd/ciigo-example/main.go @@ -16,16 +16,20 @@ import ( var ciigoFS *memfs.MemFS func main() { - opts := &ciigo.ServeOptions{ - ConvertOptions: ciigo.ConvertOptions{ - Root: "_example", - HtmlTemplate: "_example/html.tmpl", - }, - Mfs: ciigoFS, - Address: ":8080", - } + var ( + opts = &ciigo.ServeOptions{ + ConvertOptions: ciigo.ConvertOptions{ + Root: "_example", + HtmlTemplate: "_example/html.tmpl", + }, + Mfs: ciigoFS, + Address: ":8080", + } + + err error + ) - err := ciigo.Serve(opts) + err = ciigo.Serve(opts) if err != nil { log.Fatal(err) } |
