diff options
| author | Loyalsoldier <[email protected]> | 2024-08-31 12:34:38 +0800 |
|---|---|---|
| committer | Loyalsoldier <[email protected]> | 2024-08-31 12:34:38 +0800 |
| commit | 1e4cb746b9ca67b9d9dabdc65f42f495eb4cfbcd (patch) | |
| tree | ee3de1a60416c7f56dcc99a2cf7715b9b8f4e5a2 /plugin/v2ray/dat_in.go | |
| parent | deff06ac0f59751bb9857bc7d645b756b6133ddf (diff) | |
Chore: make error messages consistent across formats
Diffstat (limited to 'plugin/v2ray/dat_in.go')
| -rw-r--r-- | plugin/v2ray/dat_in.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/v2ray/dat_in.go b/plugin/v2ray/dat_in.go index 4b2a98c0..96de3d70 100644 --- a/plugin/v2ray/dat_in.go +++ b/plugin/v2ray/dat_in.go @@ -42,7 +42,7 @@ func newGeoIPDatIn(action lib.Action, data json.RawMessage) (lib.InputConverter, } if tmp.URI == "" { - return nil, fmt.Errorf("[type %s | action %s] uri must be specified in config", typeGeoIPdatIn, action) + return nil, fmt.Errorf("❌ [type %s | action %s] uri must be specified in config", typeGeoIPdatIn, action) } // Filter want list @@ -100,7 +100,7 @@ func (g *geoIPDatIn) Input(container lib.Container) (lib.Container, error) { } if len(entries) == 0 { - return nil, fmt.Errorf("❌ [type %s | action %s] no entry is generated", typeGeoIPdatIn, g.Action) + return nil, fmt.Errorf("❌ [type %s | action %s] no entry is generated", g.Type, g.Action) } var ignoreIPType lib.IgnoreIPOption @@ -151,7 +151,7 @@ func (g *geoIPDatIn) walkRemoteFile(url string, entries map[string]*lib.Entry) e defer resp.Body.Close() if resp.StatusCode != 200 { - return fmt.Errorf("failed to get remote file %s, http status code %d", url, resp.StatusCode) + return fmt.Errorf("❌ [type %s | action %s] failed to get remote file %s, http status code %d", g.Type, g.Action, url, resp.StatusCode) } if err := g.generateEntries(resp.Body, entries); err != nil { |
