mirror of
https://github.com/v2fly/domain-list-community.git
synced 2025-12-16 23:50:05 +07:00
Compare commits
1 Commits
master
...
rootmelo92
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
17da8768ca |
@@ -38,7 +38,6 @@ include:newrelic-ads
|
|||||||
include:ogury-ads
|
include:ogury-ads
|
||||||
include:ookla-speedtest-ads
|
include:ookla-speedtest-ads
|
||||||
include:openx-ads
|
include:openx-ads
|
||||||
include:picacg-ads
|
|
||||||
include:pocoiq-ads
|
include:pocoiq-ads
|
||||||
include:pubmatic-ads
|
include:pubmatic-ads
|
||||||
include:qihoo360-ads
|
include:qihoo360-ads
|
||||||
|
|||||||
@@ -23,6 +23,5 @@ include:mailru-group
|
|||||||
include:okko
|
include:okko
|
||||||
include:ozon
|
include:ozon
|
||||||
include:rutube
|
include:rutube
|
||||||
include:wink
|
|
||||||
include:x5
|
include:x5
|
||||||
include:yandex
|
include:yandex
|
||||||
|
|||||||
69
data/ctyun
69
data/ctyun
@@ -1,69 +0,0 @@
|
|||||||
# 天翼云
|
|
||||||
# 京ICP备2021034386号
|
|
||||||
ctadns.cn
|
|
||||||
bjctyiptv.cn
|
|
||||||
cqctyiptv.cn
|
|
||||||
ctacdn.cn
|
|
||||||
ctaigw.cn
|
|
||||||
ctbcdn.com
|
|
||||||
ctcdn.cn
|
|
||||||
ctcdn.com.cn
|
|
||||||
ctcdnov.net
|
|
||||||
ctcloudzos.cn
|
|
||||||
ctcns.cn
|
|
||||||
ctdcdn.com
|
|
||||||
ctdns.cn
|
|
||||||
ctdns.com.cn
|
|
||||||
ctdns.net
|
|
||||||
ctecdn.cn
|
|
||||||
ctecx.cn
|
|
||||||
ctgcdn.com
|
|
||||||
cthcdn.cn
|
|
||||||
cthcdn.com
|
|
||||||
cthcdn.net
|
|
||||||
ctlcdn.cn
|
|
||||||
ctlcdn.com
|
|
||||||
ctlcdn.net
|
|
||||||
ctmcdn.cn
|
|
||||||
ctovcdn.com
|
|
||||||
ctrender.com
|
|
||||||
ctwcdn.cn
|
|
||||||
ctxcdn.cn
|
|
||||||
ctxcdn.com
|
|
||||||
ctxcdn.net
|
|
||||||
ctxirang.cn
|
|
||||||
ctxirang.com
|
|
||||||
ctycdn.cn
|
|
||||||
ctycdn.net
|
|
||||||
ctycdn.net.cn
|
|
||||||
ctydoh.cn
|
|
||||||
ctyecx.cn
|
|
||||||
ctyiptv.cn
|
|
||||||
ctyun.cn
|
|
||||||
ctyun.com.cn
|
|
||||||
ctyuncdn.cn
|
|
||||||
ctyuncs.cn
|
|
||||||
ctyuninner.com
|
|
||||||
ctyunmds.cn
|
|
||||||
ctyunwaf.cn
|
|
||||||
ctyunwaf.com
|
|
||||||
ctyunwaf1.com
|
|
||||||
ctyunwaf3.cn
|
|
||||||
ctyunxs.cn
|
|
||||||
ctyunzos.cn
|
|
||||||
ctzcdn.cn
|
|
||||||
ctzcdn.com
|
|
||||||
edgecloudx.cn
|
|
||||||
faasapp.cn
|
|
||||||
faasdev.cn
|
|
||||||
fjctyiptv.cn
|
|
||||||
gdctyiptv.cn
|
|
||||||
gsctyiptv.cn
|
|
||||||
gsjtyiptv.cn
|
|
||||||
gzctyiptv.cn
|
|
||||||
jsctyiptv.cn
|
|
||||||
modelers.cn
|
|
||||||
scctyiptv.cn
|
|
||||||
snctyiptv.cn
|
|
||||||
ynctyiptv.cn
|
|
||||||
ynjtyiptv.cn
|
|
||||||
@@ -54,7 +54,6 @@ include:aws-cn
|
|||||||
include:baishancloud
|
include:baishancloud
|
||||||
include:bootcdn
|
include:bootcdn
|
||||||
include:cloudflare-cn
|
include:cloudflare-cn
|
||||||
include:ctyun
|
|
||||||
include:dwion
|
include:dwion
|
||||||
include:maocloud
|
include:maocloud
|
||||||
include:qingcloud
|
include:qingcloud
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ partnerad.l.google.com @ads
|
|||||||
urchin.com @ads
|
urchin.com @ads
|
||||||
|
|
||||||
full:analytics.google.com @ads
|
full:analytics.google.com @ads
|
||||||
# https://github.com/AdguardTeam/FiltersRegistry/pull/1154
|
full:fundingchoicesmessages.google.com @ads
|
||||||
# full:fundingchoicesmessages.google.com @ads
|
|
||||||
|
|
||||||
regexp:^adservice\.google\.([a-z]{2}|com?)(\.[a-z]{2})?$ @ads
|
regexp:^adservice\.google\.([a-z]{2}|com?)(\.[a-z]{2})?$ @ads
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
include:picacg-ads
|
|
||||||
|
|
||||||
bikaa.xyz
|
bikaa.xyz
|
||||||
bikac.xyz
|
bikac.xyz
|
||||||
bikaios.xyz
|
bikaios.xyz
|
||||||
@@ -12,5 +10,6 @@ picacomic.xyz
|
|||||||
wikawika.xyz
|
wikawika.xyz
|
||||||
|
|
||||||
# Image Resource Domain like `img.diwodiwo.xyz` `s3.diwodiwo.xyz` `storage.diwodiwo.xyz` `storage-b.diwodiwo.xyz`
|
# Image Resource Domain like `img.diwodiwo.xyz` `s3.diwodiwo.xyz` `storage.diwodiwo.xyz` `storage-b.diwodiwo.xyz`
|
||||||
diwodiwo.xyz
|
regexp:^([a-z0-9-]+\.)*(?!ad-display\.|ad-channel\.)[a-z0-9-]+\.diwodiwo\.xyz$
|
||||||
|
ad-channel.diwodiwo.xyz @ads
|
||||||
|
ad-display.diwodiwo.xyz @ads
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
full:ad-channel.diwodiwo.xyz @ads
|
|
||||||
full:ad-display.diwodiwo.xyz @ads
|
|
||||||
@@ -4,13 +4,18 @@
|
|||||||
60plusmilfs.com
|
60plusmilfs.com
|
||||||
analqts.com
|
analqts.com
|
||||||
ashleysageellison.com
|
ashleysageellison.com
|
||||||
|
asiancoochies.com
|
||||||
autumn-jade.com
|
autumn-jade.com
|
||||||
beascoremodel.com
|
beascoremodel.com
|
||||||
|
bigboobalexya.com
|
||||||
bigboobbundle.com
|
bigboobbundle.com
|
||||||
|
bigboobdaria.com
|
||||||
bigboobspov.com
|
bigboobspov.com
|
||||||
|
bigboobvanessay.com
|
||||||
bigtitangelawhite.com
|
bigtitangelawhite.com
|
||||||
bigtithitomi.com
|
bigtithitomi.com
|
||||||
bigtithooker.com
|
bigtithooker.com
|
||||||
|
bigtitkatiethornton.com
|
||||||
bigtitterrynova.com
|
bigtitterrynova.com
|
||||||
bigtitvenera.com
|
bigtitvenera.com
|
||||||
blackandstacked.com
|
blackandstacked.com
|
||||||
@@ -23,11 +28,13 @@ bustydustystash.com
|
|||||||
bustyinescudna.com
|
bustyinescudna.com
|
||||||
bustykellykay.com
|
bustykellykay.com
|
||||||
bustykerrymarie.com
|
bustykerrymarie.com
|
||||||
|
bustylezzies.com
|
||||||
bustylornamorgan.com
|
bustylornamorgan.com
|
||||||
bustymerilyn.com
|
bustymerilyn.com
|
||||||
bustyoldsluts.com
|
bustyoldsluts.com
|
||||||
bustysammieblack.com
|
bustysammieblack.com
|
||||||
cherrybrady.com
|
cherrybrady.com
|
||||||
|
chicksonblackdicks.com
|
||||||
chloesworld.com
|
chloesworld.com
|
||||||
christymarks.com
|
christymarks.com
|
||||||
cock4stepmom.com
|
cock4stepmom.com
|
||||||
@@ -37,6 +44,7 @@ crystalgunnsworld.com
|
|||||||
daylenerio.com
|
daylenerio.com
|
||||||
desiraesworld.com
|
desiraesworld.com
|
||||||
dianepoppos.com
|
dianepoppos.com
|
||||||
|
ebonythots.com
|
||||||
eboobstore.com
|
eboobstore.com
|
||||||
evanottyvideos.com
|
evanottyvideos.com
|
||||||
feedherfuckher.com
|
feedherfuckher.com
|
||||||
@@ -45,14 +53,19 @@ getscorecash.com
|
|||||||
grannygetsafacial.com
|
grannygetsafacial.com
|
||||||
grannylovesbbc.com
|
grannylovesbbc.com
|
||||||
grannylovesyoungcock.com
|
grannylovesyoungcock.com
|
||||||
|
hairycoochies.com
|
||||||
homealonemilfs.com
|
homealonemilfs.com
|
||||||
|
hornyasianmilfs.com
|
||||||
ibonedyourmom.com
|
ibonedyourmom.com
|
||||||
ifuckedtheboss.com
|
ifuckedtheboss.com
|
||||||
|
jessicaturner.co.uk
|
||||||
jessicaturner.com
|
jessicaturner.com
|
||||||
joanabliss.com
|
joanabliss.com
|
||||||
juliamiles.com
|
juliamiles.com
|
||||||
karinahart.com
|
karinahart.com
|
||||||
karlajames.com
|
karlajames.com
|
||||||
|
latinacoochies.com
|
||||||
|
latinmommas.com
|
||||||
leannecrowvideos.com
|
leannecrowvideos.com
|
||||||
legsex.com
|
legsex.com
|
||||||
linseysworld.com
|
linseysworld.com
|
||||||
@@ -73,6 +86,7 @@ pickinguppussy.com
|
|||||||
pornloser.com
|
pornloser.com
|
||||||
pornmegaload.com
|
pornmegaload.com
|
||||||
reneerossvideos.com
|
reneerossvideos.com
|
||||||
|
roxired.com
|
||||||
sarennasworld.com
|
sarennasworld.com
|
||||||
scoreclassics.com
|
scoreclassics.com
|
||||||
scoregroup.com
|
scoregroup.com
|
||||||
|
|||||||
@@ -1,24 +1,6 @@
|
|||||||
aaid.umeng.com @ads
|
aaid.umeng.com @ads
|
||||||
alog.umeng.com @ads
|
alog.umeng.com @ads
|
||||||
alog.umengcloud.com @ads
|
alog.umengcloud.com @ads
|
||||||
alogs.umeng.com @ads
|
|
||||||
alogus.umeng.com @ads
|
|
||||||
ar.umeng.com @ads
|
|
||||||
aspect-upush.umeng.com @ads
|
|
||||||
audid.umeng.com @ads
|
|
||||||
ccs.umeng.com @ads
|
|
||||||
cnlogs.umeng.com @ads
|
|
||||||
cnlogs.umengcloud.com @ads
|
|
||||||
# https://github.com/TG-Twilight/AWAvenue-Ads-Rule/issues/185
|
|
||||||
# errlog.umeng.com @ads
|
|
||||||
# errnewlog.umeng.com @ads
|
|
||||||
new-aaid.umeng.com @ads
|
|
||||||
new-aaid.umeng.com.gds.alibabadns.com @ads
|
|
||||||
oc.umeng.com @ads
|
|
||||||
plbslog.umeng.com @ads
|
|
||||||
resolve.umeng.com @ads
|
|
||||||
ulogs.umeng.com @ads
|
|
||||||
ulogs.umengcloud.com @ads
|
|
||||||
utoken.umeng.com @ads
|
utoken.umeng.com @ads
|
||||||
|
|
||||||
# CNZZ
|
# CNZZ
|
||||||
|
|||||||
65
main.go
65
main.go
@@ -2,11 +2,11 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"errors"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -22,14 +22,6 @@ var (
|
|||||||
exportLists = flag.String("exportlists", "", "Lists to be flattened and exported in plaintext format, separated by ',' comma")
|
exportLists = flag.String("exportlists", "", "Lists to be flattened and exported in plaintext format, separated by ',' comma")
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
RuleTypeDomain string = "domain"
|
|
||||||
RuleTypeFullDomain string = "full"
|
|
||||||
RuleTypeKeyword string = "keyword"
|
|
||||||
RuleTypeRegexp string = "regexp"
|
|
||||||
RuleTypeInclude string = "include"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Entry struct {
|
type Entry struct {
|
||||||
Type string
|
Type string
|
||||||
Value string
|
Value string
|
||||||
@@ -72,41 +64,32 @@ func (l *ParsedList) toProto() (*router.GeoSite, error) {
|
|||||||
}
|
}
|
||||||
for _, entry := range l.Entry {
|
for _, entry := range l.Entry {
|
||||||
switch entry.Type {
|
switch entry.Type {
|
||||||
case RuleTypeDomain:
|
case "domain":
|
||||||
site.Domain = append(site.Domain, &router.Domain{
|
site.Domain = append(site.Domain, &router.Domain{
|
||||||
Type: router.Domain_RootDomain,
|
Type: router.Domain_RootDomain,
|
||||||
Value: entry.Value,
|
Value: entry.Value,
|
||||||
Attribute: entry.Attrs,
|
Attribute: entry.Attrs,
|
||||||
})
|
})
|
||||||
|
case "regexp":
|
||||||
case RuleTypeRegexp:
|
|
||||||
// check regexp validity to avoid runtime error
|
|
||||||
_, err := regexp.Compile(entry.Value)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("invalid regexp in list %s: %s", l.Name, entry.Value)
|
|
||||||
}
|
|
||||||
site.Domain = append(site.Domain, &router.Domain{
|
site.Domain = append(site.Domain, &router.Domain{
|
||||||
Type: router.Domain_Regex,
|
Type: router.Domain_Regex,
|
||||||
Value: entry.Value,
|
Value: entry.Value,
|
||||||
Attribute: entry.Attrs,
|
Attribute: entry.Attrs,
|
||||||
})
|
})
|
||||||
|
case "keyword":
|
||||||
case RuleTypeKeyword:
|
|
||||||
site.Domain = append(site.Domain, &router.Domain{
|
site.Domain = append(site.Domain, &router.Domain{
|
||||||
Type: router.Domain_Plain,
|
Type: router.Domain_Plain,
|
||||||
Value: entry.Value,
|
Value: entry.Value,
|
||||||
Attribute: entry.Attrs,
|
Attribute: entry.Attrs,
|
||||||
})
|
})
|
||||||
|
case "full":
|
||||||
case RuleTypeFullDomain:
|
|
||||||
site.Domain = append(site.Domain, &router.Domain{
|
site.Domain = append(site.Domain, &router.Domain{
|
||||||
Type: router.Domain_Full,
|
Type: router.Domain_Full,
|
||||||
Value: entry.Value,
|
Value: entry.Value,
|
||||||
Attribute: entry.Attrs,
|
Attribute: entry.Attrs,
|
||||||
})
|
})
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("unknown domain type: %s", entry.Type)
|
return nil, errors.New("unknown domain type: " + entry.Type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return site, nil
|
return site, nil
|
||||||
@@ -116,7 +99,7 @@ func exportPlainTextList(list []string, refName string, pl *ParsedList) {
|
|||||||
for _, listName := range list {
|
for _, listName := range list {
|
||||||
if strings.EqualFold(refName, listName) {
|
if strings.EqualFold(refName, listName) {
|
||||||
if err := pl.toPlainText(strings.ToLower(refName)); err != nil {
|
if err := pl.toPlainText(strings.ToLower(refName)); err != nil {
|
||||||
fmt.Println("Failed:", err)
|
fmt.Println("Failed: ", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
fmt.Printf("'%s' has been generated successfully.\n", listName)
|
fmt.Printf("'%s' has been generated successfully.\n", listName)
|
||||||
@@ -135,30 +118,24 @@ func removeComment(line string) string {
|
|||||||
func parseDomain(domain string, entry *Entry) error {
|
func parseDomain(domain string, entry *Entry) error {
|
||||||
kv := strings.Split(domain, ":")
|
kv := strings.Split(domain, ":")
|
||||||
if len(kv) == 1 {
|
if len(kv) == 1 {
|
||||||
entry.Type = RuleTypeDomain
|
entry.Type = "domain"
|
||||||
entry.Value = strings.ToLower(kv[0])
|
entry.Value = strings.ToLower(kv[0])
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(kv) == 2 {
|
if len(kv) == 2 {
|
||||||
entry.Type = strings.ToLower(kv[0])
|
entry.Type = strings.ToLower(kv[0])
|
||||||
|
entry.Value = strings.ToLower(kv[1])
|
||||||
if strings.EqualFold(entry.Type, RuleTypeRegexp) {
|
|
||||||
entry.Value = kv[1]
|
|
||||||
} else {
|
|
||||||
entry.Value = strings.ToLower(kv[1])
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Errorf("invalid format: %s", domain)
|
return errors.New("Invalid format: " + domain)
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseAttribute(attr string) (*router.Domain_Attribute, error) {
|
func parseAttribute(attr string) (*router.Domain_Attribute, error) {
|
||||||
var attribute router.Domain_Attribute
|
var attribute router.Domain_Attribute
|
||||||
if len(attr) == 0 || attr[0] != '@' {
|
if len(attr) == 0 || attr[0] != '@' {
|
||||||
return &attribute, fmt.Errorf("invalid attribute: %s", attr)
|
return &attribute, errors.New("invalid attribute: " + attr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trim attribute prefix `@` character
|
// Trim attribute prefix `@` character
|
||||||
@@ -171,7 +148,7 @@ func parseAttribute(attr string) (*router.Domain_Attribute, error) {
|
|||||||
attribute.Key = strings.ToLower(parts[0])
|
attribute.Key = strings.ToLower(parts[0])
|
||||||
intv, err := strconv.Atoi(parts[1])
|
intv, err := strconv.Atoi(parts[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return &attribute, fmt.Errorf("invalid attribute: %s: %v", attr, err)
|
return &attribute, errors.New("invalid attribute: " + attr + ": " + err.Error())
|
||||||
}
|
}
|
||||||
attribute.TypedValue = &router.Domain_Attribute_IntValue{IntValue: int64(intv)}
|
attribute.TypedValue = &router.Domain_Attribute_IntValue{IntValue: int64(intv)}
|
||||||
}
|
}
|
||||||
@@ -184,7 +161,7 @@ func parseEntry(line string) (Entry, error) {
|
|||||||
|
|
||||||
var entry Entry
|
var entry Entry
|
||||||
if len(parts) == 0 {
|
if len(parts) == 0 {
|
||||||
return entry, fmt.Errorf("empty entry")
|
return entry, errors.New("empty entry")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := parseDomain(parts[0], &entry); err != nil {
|
if err := parseDomain(parts[0], &entry); err != nil {
|
||||||
@@ -278,7 +255,7 @@ func ParseList(list *List, ref map[string]*List) (*ParsedList, error) {
|
|||||||
newEntryList := make([]Entry, 0, len(entryList))
|
newEntryList := make([]Entry, 0, len(entryList))
|
||||||
hasInclude := false
|
hasInclude := false
|
||||||
for _, entry := range entryList {
|
for _, entry := range entryList {
|
||||||
if entry.Type == RuleTypeInclude {
|
if entry.Type == "include" {
|
||||||
refName := strings.ToUpper(entry.Value)
|
refName := strings.ToUpper(entry.Value)
|
||||||
if entry.Attrs != nil {
|
if entry.Attrs != nil {
|
||||||
for _, attr := range entry.Attrs {
|
for _, attr := range entry.Attrs {
|
||||||
@@ -290,7 +267,7 @@ func ParseList(list *List, ref map[string]*List) (*ParsedList, error) {
|
|||||||
|
|
||||||
refList := ref[refName]
|
refList := ref[refName]
|
||||||
if refList == nil {
|
if refList == nil {
|
||||||
return nil, fmt.Errorf("list not found: %s", entry.Value)
|
return nil, errors.New(entry.Value + " not found.")
|
||||||
}
|
}
|
||||||
attrEntrys := createIncludeAttrEntrys(refList, attr)
|
attrEntrys := createIncludeAttrEntrys(refList, attr)
|
||||||
if len(attrEntrys) != 0 {
|
if len(attrEntrys) != 0 {
|
||||||
@@ -305,7 +282,7 @@ func ParseList(list *List, ref map[string]*List) (*ParsedList, error) {
|
|||||||
pl.Inclusion[InclusionName] = true
|
pl.Inclusion[InclusionName] = true
|
||||||
refList := ref[refName]
|
refList := ref[refName]
|
||||||
if refList == nil {
|
if refList == nil {
|
||||||
return nil, fmt.Errorf("list not found: %s", entry.Value)
|
return nil, errors.New(entry.Value + " not found.")
|
||||||
}
|
}
|
||||||
newEntryList = append(newEntryList, refList.Entry...)
|
newEntryList = append(newEntryList, refList.Entry...)
|
||||||
}
|
}
|
||||||
@@ -346,14 +323,14 @@ func main() {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Failed:", err)
|
fmt.Println("Failed: ", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create output directory if not exist
|
// Create output directory if not exist
|
||||||
if _, err := os.Stat(*outputDir); os.IsNotExist(err) {
|
if _, err := os.Stat(*outputDir); os.IsNotExist(err) {
|
||||||
if mkErr := os.MkdirAll(*outputDir, 0755); mkErr != nil {
|
if mkErr := os.MkdirAll(*outputDir, 0755); mkErr != nil {
|
||||||
fmt.Println("Failed:", mkErr)
|
fmt.Println("Failed: ", mkErr)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -363,12 +340,12 @@ func main() {
|
|||||||
for refName, list := range ref {
|
for refName, list := range ref {
|
||||||
pl, err := ParseList(list, ref)
|
pl, err := ParseList(list, ref)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Failed:", err)
|
fmt.Println("Failed: ", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
site, err := pl.toProto()
|
site, err := pl.toProto()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Failed:", err)
|
fmt.Println("Failed: ", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
protoList.Entry = append(protoList.Entry, site)
|
protoList.Entry = append(protoList.Entry, site)
|
||||||
@@ -406,7 +383,7 @@ func main() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
if err := os.WriteFile(filepath.Join(*outputDir, *outputName), protoBytes, 0644); err != nil {
|
if err := os.WriteFile(filepath.Join(*outputDir, *outputName), protoBytes, 0644); err != nil {
|
||||||
fmt.Println("Failed:", err)
|
fmt.Println("Failed: ", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
} else {
|
} else {
|
||||||
fmt.Println(*outputName, "has been generated successfully.")
|
fmt.Println(*outputName, "has been generated successfully.")
|
||||||
|
|||||||
Reference in New Issue
Block a user