aboutsummaryrefslogtreecommitdiff
path: root/http_server.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-08-21 02:13:24 +0700
committerShulhan <ms@kilabit.info>2022-08-21 02:13:24 +0700
commit644439ff61c46aec81894074203bc7d3c9acc24d (patch)
tree585974444e66405302a88b9c64b4b49995f6c928 /http_server.go
parentafdb3dca0639193d3d5c39ebed1b05b59004b07b (diff)
downloadgorankusu-644439ff61c46aec81894074203bc7d3c9acc24d.tar.xz
go.mod: set minimum Go to 1.18 and update all dependencies
This changes replace any usage of ioutil with os and io package.
Diffstat (limited to 'http_server.go')
-rw-r--r--http_server.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/http_server.go b/http_server.go
index 52610b2..43d166d 100644
--- a/http_server.go
+++ b/http_server.go
@@ -71,14 +71,14 @@ func (trunks *Trunks) initHttpServer(isDevelopment bool) (err error) {
Includes: []string{
`.*\.(js|html|ico|png)$`,
},
- Development: true,
+ TryDirect: true,
}
memfsWWW, err = memfs.New(&mfsOptions)
if err != nil {
return fmt.Errorf("%s: %w", logp, err)
}
} else {
- memfsWWW.Opts.Development = isDevelopment
+ memfsWWW.Opts.TryDirect = isDevelopment
}
httpdOpts := &libhttp.ServerOptions{
@@ -134,9 +134,7 @@ func (trunks *Trunks) initHttpServer(isDevelopment bool) (err error) {
return nil
}
-//
// apiEnvironmentGet get the Trunks environment including its state.
-//
func (trunks *Trunks) apiEnvironmentGet(epr *libhttp.EndpointRequest) (resbody []byte, err error) {
res := libhttp.EndpointResponse{}
res.Code = http.StatusOK