1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-03 15:55:20 -05:00

Style: format code by gofumpt (#1022)

This commit is contained in:
Loyalsoldier
2021-05-20 05:28:52 +08:00
committed by GitHub
parent cf009a4ba2
commit 6f8979d017
87 changed files with 249 additions and 270 deletions

View File

@@ -38,13 +38,13 @@ func init() {
os.Setenv("v2ray.location.asset", tempPath)
if _, err := os.Stat(geoipPath); err != nil && errors.Is(err, fs.ErrNotExist) {
common.Must(os.MkdirAll(tempPath, 0755))
common.Must(os.MkdirAll(tempPath, 0o755))
geoipBytes, err := common.FetchHTTPContent(geoipURL)
common.Must(err)
common.Must(filesystem.WriteFile(geoipPath, geoipBytes))
}
if _, err := os.Stat(geositePath); err != nil && errors.Is(err, fs.ErrNotExist) {
common.Must(os.MkdirAll(tempPath, 0755))
common.Must(os.MkdirAll(tempPath, 0o755))
geositeBytes, err := common.FetchHTTPContent(geositeURL)
common.Must(err)
common.Must(filesystem.WriteFile(geositePath, geositeBytes))
@@ -369,6 +369,7 @@ func loadGeoSite(country string) ([]*router.Domain, error) {
return nil, errors.New("country not found: " + country)
}
func TestChinaSites(t *testing.T) {
domains, err := loadGeoSite("CN")
common.Must(err)