Move just a spectacular amount of config stuff into a config package because
This commit is contained in:
10
config.go
10
config.go
@ -96,16 +96,6 @@ func (f *I2PConfig) Leasesetsettings() (string, string, string) {
|
||||
return r, s, t
|
||||
}
|
||||
|
||||
// SessionStyle returns the session style setting in the form of "STYLE=style"
|
||||
func (f *I2PConfig) SessionStyle() string {
|
||||
if f.SessionOptions.Style != "" {
|
||||
log.WithField("style", f.SessionOptions.Style).Debug("Session style set")
|
||||
return " STYLE=" + f.SessionOptions.Style + " "
|
||||
}
|
||||
log.Debug("Using default STREAM style")
|
||||
return " STYLE=STREAM "
|
||||
}
|
||||
|
||||
// MinSAM returns the minimum SAM version required in major.minor form
|
||||
func (f *I2PConfig) MinSAM() string {
|
||||
min, _ := f.GetVersions()
|
||||
|
@ -71,3 +71,13 @@ func (f *SessionOptions) ToPort() string {
|
||||
log.Debug("ToPort not set")
|
||||
return ""
|
||||
}
|
||||
|
||||
// SessionStyle returns the session style setting in the form of "STYLE=style"
|
||||
func (f *SessionOptions) SessionStyle() string {
|
||||
if f.Style != "" {
|
||||
log.WithField("style", f.Style).Debug("Session style set")
|
||||
return " STYLE=" + f.Style + " "
|
||||
}
|
||||
log.Debug("Using default STREAM style")
|
||||
return " STYLE=STREAM "
|
||||
}
|
||||
|
Reference in New Issue
Block a user