api/pkg/config/handler_config.go
Peter Kurfer 49e58ac2e4 Add advanced matching options to HTTP handler
- move to Gitlab
- make code better testable
- create app abstraction for server
- cleanup
2020-12-26 13:11:49 +00:00

18 lines
288 B
Go

package config
import (
"fmt"
"github.com/spf13/viper"
)
type HandlerConfig struct {
HandlerName string
Port uint16
ListenAddress string
Options *viper.Viper
}
func (h HandlerConfig) ListenAddr() string {
return fmt.Sprintf("%s:%d", h.ListenAddress, h.Port)
}