Skip to content

Commit f06f22b

Browse files
author
Michael Gunkoff
committed
additional code rearrangement to comply with Windows
1 parent f1e6a16 commit f06f22b

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

converters_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build !windows
2+
13
package settings
24

35
import (

ready_settings.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build !windows
2+
13
package settings
24

35
import (

ready_settings_windows.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// +build windows
2+
3+
package settings
4+
5+
import "github.com/rs/zerolog"
6+
7+
// LoggerOptions — модель данных настроек логгера.
8+
type LoggerOptions struct {
9+
LogLevel zerolog.Level `env:"LOG_LEVEL" toml:"log.level" default:"debug"`
10+
Syslog string `env:"SYSLOG" toml:"log.syslog_addr" default:"127.0.0.1:514" validate:"tcp_addr"`
11+
SyslogProtocol string `env:"SYSLOG_PROTOCOL" toml:"log.syslog_protocol" default:"udp" validate:"min=3,max=3"`
12+
Colour bool `env:"COLOUR" toml:"log.colour" default:"false"`
13+
StdOut bool `env:"STDOUT" toml:"log.stdout" default:"false"`
14+
}

0 commit comments

Comments
 (0)