diff options
| author | copilot-swe-agent[bot] <[email protected]> | 2026-04-28 18:24:00 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-28 18:24:00 +0000 |
| commit | 8834c0be63ee88e0ad23fe621d5f5fe344b32089 (patch) | |
| tree | 49029d2fd927e8832d05420d1bf1cf850aa22325 /plugin/maxmind/maxmind_country_mmdb_in.go | |
| parent | 4f125e579472e5ed87fd052ef68ab80f5fe679b0 (diff) | |
Refactor all plugins to use functional options patterncopilot/refactor-plugins-functional-options
Agent-Logs-Url: https://github.com/Loyalsoldier/geoip/sessions/e2b66c9a-3d01-490c-9b31-32109cfe4feb
Co-authored-by: Loyalsoldier <[email protected]>
Diffstat (limited to 'plugin/maxmind/maxmind_country_mmdb_in.go')
| -rw-r--r-- | plugin/maxmind/maxmind_country_mmdb_in.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugin/maxmind/maxmind_country_mmdb_in.go b/plugin/maxmind/maxmind_country_mmdb_in.go index 1f6d5386..d9015e34 100644 --- a/plugin/maxmind/maxmind_country_mmdb_in.go +++ b/plugin/maxmind/maxmind_country_mmdb_in.go @@ -18,14 +18,14 @@ const ( func init() { lib.RegisterInputConfigCreator(TypeGeoLite2CountryMMDBIn, func(action lib.Action, data json.RawMessage) (lib.InputConverter, error) { - return newGeoLite2CountryMMDBIn(TypeGeoLite2CountryMMDBIn, DescGeoLite2CountryMMDBIn, action, data) + return NewGeoLite2CountryMMDBInFromBytes(TypeGeoLite2CountryMMDBIn, DescGeoLite2CountryMMDBIn, action, data) }) - lib.RegisterInputConverter(TypeGeoLite2CountryMMDBIn, &GeoLite2CountryMMDBIn{ + lib.RegisterInputConverter(TypeGeoLite2CountryMMDBIn, &geoLite2CountryMMDBIn{ Description: DescGeoLite2CountryMMDBIn, }) } -type GeoLite2CountryMMDBIn struct { +type geoLite2CountryMMDBIn struct { Type string Action lib.Action Description string @@ -34,19 +34,19 @@ type GeoLite2CountryMMDBIn struct { OnlyIPType lib.IPType } -func (g *GeoLite2CountryMMDBIn) GetType() string { +func (g *geoLite2CountryMMDBIn) GetType() string { return g.Type } -func (g *GeoLite2CountryMMDBIn) GetAction() lib.Action { +func (g *geoLite2CountryMMDBIn) GetAction() lib.Action { return g.Action } -func (g *GeoLite2CountryMMDBIn) GetDescription() string { +func (g *geoLite2CountryMMDBIn) GetDescription() string { return g.Description } -func (g *GeoLite2CountryMMDBIn) Input(container lib.Container) (lib.Container, error) { +func (g *geoLite2CountryMMDBIn) Input(container lib.Container) (lib.Container, error) { var content []byte var err error switch { @@ -89,7 +89,7 @@ func (g *GeoLite2CountryMMDBIn) Input(container lib.Container) (lib.Container, e return container, nil } -func (g *GeoLite2CountryMMDBIn) generateEntries(content []byte, entries map[string]*lib.Entry) error { +func (g *geoLite2CountryMMDBIn) generateEntries(content []byte, entries map[string]*lib.Entry) error { db, err := maxminddb.OpenBytes(content) if err != nil { return err |
