diff options
Diffstat (limited to 'awwan.go')
| -rw-r--r-- | awwan.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -7,7 +7,6 @@ import ( "context" "fmt" "log" - "net" "os" "path/filepath" "strconv" @@ -21,7 +20,7 @@ import ( ) // Version current version of this module (library and program). -var Version = `0.13.2` +var Version = `0.14.0` // osGetwd define the handler to get current working directory. // @@ -485,14 +484,14 @@ out: } // Serve start the web-user interface that serve awwan through HTTP. -func (aww *Awwan) Serve(listener net.Listener, address string, isDev bool) (err error) { +func (aww *Awwan) Serve(serveOpts ServeOptions) (err error) { var logp = `Serve` - if isDev { + if serveOpts.IsDevelopment { go internal.Watch() } - aww.httpd, err = newHTTPServer(aww, listener, address) + aww.httpd, err = newHTTPServer(aww, serveOpts) if err != nil { return fmt.Errorf(`%s: %w`, logp, err) } |
