From 644439ff61c46aec81894074203bc7d3c9acc24d Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sun, 21 Aug 2022 02:13:24 +0700 Subject: go.mod: set minimum Go to 1.18 and update all dependencies This changes replace any usage of ioutil with os and io package. --- http_server.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'http_server.go') 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 -- cgit v1.3