removed repeated GetId functions using struct embedding
This commit is contained in:
@ -51,6 +51,10 @@ type PXYServiceConfig struct {
|
||||
Addrs []string `yaml:"addresses"`
|
||||
}
|
||||
|
||||
type WPXServiceConfig struct {
|
||||
Addrs []string `yaml:"addresses"`
|
||||
}
|
||||
|
||||
type RPCServiceConfig struct { // rpc server-side configuration
|
||||
Addrs []string `yaml:"addresses"`
|
||||
}
|
||||
@ -94,7 +98,7 @@ type ServerConfig struct {
|
||||
} `yaml:"pxy"`
|
||||
|
||||
WPX struct {
|
||||
Service PXYServiceConfig `yaml:"service"`
|
||||
Service WPXServiceConfig `yaml:"service"`
|
||||
TLS ServerTLSConfig `yaml:"tls"`
|
||||
} `yaml:"wpx"`
|
||||
|
||||
|
@ -144,7 +144,7 @@ func (l *AppLogger) write(id string, level hodu.LogLevel, call_depth int, fmtstr
|
||||
off_m = off_s / 60;
|
||||
off_h = off_m / 60;
|
||||
off_m = off_m % 60;
|
||||
if (off_m < 0) { off_m = -off_m; }
|
||||
if off_m < 0 { off_m = -off_m; }
|
||||
|
||||
sb.WriteString(
|
||||
fmt.Sprintf("%04d-%02d-%02d %02d:%02d:%02d %+03d%02d ",
|
||||
|
@ -15,7 +15,6 @@ import "sync"
|
||||
import "syscall"
|
||||
import "time"
|
||||
|
||||
|
||||
// Don't change these items to 'const' as they can be overridden externally with a linker option
|
||||
var HODU_NAME string = "hodu"
|
||||
var HODU_VERSION string = "0.0.0"
|
||||
@ -375,7 +374,7 @@ func main() {
|
||||
|
||||
if flgs.NArg() > 0 { goto wrong_usage }
|
||||
|
||||
if (cfgfile != "") {
|
||||
if cfgfile != "" {
|
||||
cfg, err = load_server_config(cfgfile)
|
||||
if err != nil {
|
||||
fmt.Printf ("ERROR: failed to load configuration file %s - %s\n", cfgfile, err.Error())
|
||||
|
Reference in New Issue
Block a user