From 42db1778ac20f7d0e3cfb0e8c6079b8785bc883c Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 18 Nov 2019 17:30:54 -0500 Subject: [PATCH] unexport rawLimiterConfig --- irc/connection_limits/limiter.go | 8 ++++---- irc/connection_limits/limiter_test.go | 2 +- irc/connection_limits/throttler_test.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/irc/connection_limits/limiter.go b/irc/connection_limits/limiter.go index c8aea7b0..646aa798 100644 --- a/irc/connection_limits/limiter.go +++ b/irc/connection_limits/limiter.go @@ -30,9 +30,9 @@ type customLimit struct { } // LimiterConfig controls the automated connection limits. -// RawLimiterConfig contains all the YAML-visible fields; +// rawLimiterConfig contains all the YAML-visible fields; // LimiterConfig contains additional denormalized private fields -type RawLimiterConfig struct { +type rawLimiterConfig struct { Limit bool MaxConcurrent int `yaml:"max-concurrent-connections"` @@ -50,7 +50,7 @@ type RawLimiterConfig struct { } type LimiterConfig struct { - RawLimiterConfig + rawLimiterConfig ipv4Mask net.IPMask ipv6Mask net.IPMask @@ -59,7 +59,7 @@ type LimiterConfig struct { } func (config *LimiterConfig) UnmarshalYAML(unmarshal func(interface{}) error) (err error) { - if err = unmarshal(&config.RawLimiterConfig); err != nil { + if err = unmarshal(&config.rawLimiterConfig); err != nil { return err } return config.postprocess() diff --git a/irc/connection_limits/limiter_test.go b/irc/connection_limits/limiter_test.go index dfe9139f..c789f2ae 100644 --- a/irc/connection_limits/limiter_test.go +++ b/irc/connection_limits/limiter_test.go @@ -18,7 +18,7 @@ func easyParseIP(ipstr string) (result net.IP) { } var baseConfig = LimiterConfig{ - RawLimiterConfig: RawLimiterConfig{ + rawLimiterConfig: rawLimiterConfig{ Limit: true, MaxConcurrent: 4, diff --git a/irc/connection_limits/throttler_test.go b/irc/connection_limits/throttler_test.go index e8fc8687..313a55f0 100644 --- a/irc/connection_limits/throttler_test.go +++ b/irc/connection_limits/throttler_test.go @@ -66,7 +66,7 @@ func makeTestThrottler(v4len, v6len int) *Limiter { minute, _ := time.ParseDuration("1m") maxConnections := 3 config := LimiterConfig{ - RawLimiterConfig: RawLimiterConfig{ + rawLimiterConfig: rawLimiterConfig{ Limit: false, Throttle: true, CidrLenIPv4: v4len,