aboutsummaryrefslogtreecommitdiff
path: root/cmd/ciigo-example
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2020-05-01 13:58:48 +0700
committerShulhan <ms@kilabit.info>2020-05-01 13:58:48 +0700
commit8713b9674b608dd2c7e95215d4b7e8a298898611 (patch)
tree7ac82be926b84f686497323e685dd2928420233e /cmd/ciigo-example
parent9789c9f4528aa9e5e5e7d25009b2264e47298d2a (diff)
downloadciigo-8713b9674b608dd2c7e95215d4b7e8a298898611.tar.xz
all: simplify serving content using function Serve
Previously to serve the generated content we call two fucntions: NewServer() and Server.Start(). This changes unexported the internal server, and expose only the Serve() function with the same parameter as NewServer().
Diffstat (limited to 'cmd/ciigo-example')
-rw-r--r--cmd/ciigo-example/main.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/ciigo-example/main.go b/cmd/ciigo-example/main.go
index a636b0e..30f4e82 100644
--- a/cmd/ciigo-example/main.go
+++ b/cmd/ciigo-example/main.go
@@ -13,7 +13,5 @@ import (
)
func main() {
- srv := ciigo.NewServer("./content", ":8080", "./templates/html.tmpl")
-
- srv.Start()
+ ciigo.Serve("./content", ":8080", "./templates/html.tmpl")
}