update domains&tools (#1821)
* update data/bytedance * update data/kuaishou * update ecombdapi.com * update tools --------- Co-authored-by: local@localhost <local@localhost>
This commit is contained in:
5
main.go
5
main.go
@ -5,7 +5,6 @@ import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
@ -53,7 +52,7 @@ func (l *ParsedList) toPlainText(listName string) error {
|
||||
// Entry output format is: type:domain.tld:@attr1,@attr2
|
||||
entryBytes = append(entryBytes, []byte(entry.Type+":"+entry.Value+attrString+"\n")...)
|
||||
}
|
||||
if err := ioutil.WriteFile(filepath.Join(*outputDir, listName+".txt"), entryBytes, 0644); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(*outputDir, listName+".txt"), entryBytes, 0644); err != nil {
|
||||
return fmt.Errorf(err.Error())
|
||||
}
|
||||
return nil
|
||||
@ -383,7 +382,7 @@ func main() {
|
||||
fmt.Println("Failed:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
if err := ioutil.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)
|
||||
os.Exit(1)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user