mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Refactor builders
This commit is contained in:
@@ -47,15 +47,17 @@ func main() {
|
||||
}
|
||||
|
||||
// Create web server
|
||||
if cfg.Port == 0 {
|
||||
log.Debug("using default port 8080")
|
||||
cfg.Port = 8080
|
||||
port := cfg.Server.Port
|
||||
if port == 0 {
|
||||
port = 8080
|
||||
}
|
||||
|
||||
srv := http.Server{
|
||||
Addr: fmt.Sprintf(":%d", cfg.Port),
|
||||
Addr: fmt.Sprintf(":%d", port),
|
||||
}
|
||||
|
||||
log.Debugf("using address %s", srv.Addr)
|
||||
|
||||
// Run listener
|
||||
go func() {
|
||||
log.Infof("running listener at %s", srv.Addr)
|
||||
|
||||
Reference in New Issue
Block a user