+
Skip to content

remove use of the term 'blacklist' #1563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions github/gen-accessors.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ var (

sourceTmpl = template.Must(template.New("source").Parse(source))

// blacklistStructMethod lists "struct.method" combos to skip.
blacklistStructMethod = map[string]bool{
// skipStructMethods lists "struct.method" combos to skip.
skipStructMethods = map[string]bool{
"RepositoryContent.GetContent": true,
"Client.GetBaseURL": true,
"Client.GetUploadURL": true,
"ErrorResponse.GetResponse": true,
"RateLimitError.GetResponse": true,
"AbuseRateLimitError.GetResponse": true,
}
// blacklistStruct lists structs to skip.
blacklistStruct = map[string]bool{
// skipStructs lists structs to skip.
skipStructs = map[string]bool{
"Client": true,
}
)
Expand Down Expand Up @@ -104,9 +104,9 @@ func (t *templateData) processAST(f *ast.File) error {
logf("Struct %v is unexported; skipping.", ts.Name)
continue
}
// Check if the struct is blacklisted.
if blacklistStruct[ts.Name.Name] {
logf("Struct %v is blacklisted; skipping.", ts.Name)
// Check if the struct should be skipped.
if skipStructs[ts.Name.Name] {
logf("Struct %v is in skip list; skipping.", ts.Name)
continue
}
st, ok := ts.Type.(*ast.StructType)
Expand All @@ -125,9 +125,9 @@ func (t *templateData) processAST(f *ast.File) error {
logf("Field %v is unexported; skipping.", fieldName)
continue
}
// Check if "struct.method" is blacklisted.
if key := fmt.Sprintf("%v.Get%v", ts.Name, fieldName); blacklistStructMethod[key] {
logf("Method %v is blacklisted; skipping.", key)
// Check if "struct.method" should be skipped.
if key := fmt.Sprintf("%v.Get%v", ts.Name, fieldName); skipStructMethods[key] {
logf("Method %v is skip list; skipping.", key)
continue
}

Expand Down
20 changes: 10 additions & 10 deletions github/gen-stringify-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const (
var (
verbose = flag.Bool("v", false, "Print verbose log messages")

// blacklistStructMethod lists "struct.method" combos to skip.
blacklistStructMethod = map[string]bool{}
// blacklistStruct lists structs to skip.
blacklistStruct = map[string]bool{
// skipStructMethods lists "struct.method" combos to skip.
skipStructMethods = map[string]bool{}
// skipStructs lists structs to skip.
skipStructs = map[string]bool{
"RateLimits": true,
}

Expand Down Expand Up @@ -166,9 +166,9 @@ func (t *templateData) processAST(f *ast.File) error {
logf("Struct %v is unexported; skipping.", ts.Name)
continue
}
// Check if the struct is blacklisted.
if blacklistStruct[ts.Name.Name] {
logf("Struct %v is blacklisted; skipping.", ts.Name)
// Check if the struct should be skipped.
if skipStructs[ts.Name.Name] {
logf("Struct %v is in skip list; skipping.", ts.Name)
continue
}
st, ok := ts.Type.(*ast.StructType)
Expand Down Expand Up @@ -203,9 +203,9 @@ func (t *templateData) processAST(f *ast.File) error {
logf("Field %v is unexported; skipping.", fieldName)
continue
}
// Check if "struct.method" is blacklisted.
if key := fmt.Sprintf("%v.Get%v", ts.Name, fieldName); blacklistStructMethod[key] {
logf("Method %v is blacklisted; skipping.", key)
// Check if "struct.method" should be skipped.
if key := fmt.Sprintf("%v.Get%v", ts.Name, fieldName); skipStructMethods[key] {
logf("Method %v is in skip list; skipping.", key)
continue
}

Expand Down
8 changes: 4 additions & 4 deletions update-urls/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ var (
verbose = flag.Bool("v", false, "Print verbose log messages")
debugFile = flag.String("d", "", "Debug named file only")

// methodBlacklist holds methods that do not have GitHub v3 API URLs
// or are otherwise problematic in parsing, discovering, and/or fixing.
methodBlacklist = map[string]bool{
// skipMethods holds methods which are skipped because they do not have GitHub v3
// API URLs or are otherwise problematic in parsing, discovering, and/or fixing.
skipMethods = map[string]bool{
"ActionsService.DownloadArtifact": true,
"AdminService.CreateOrg": true,
"AdminService.CreateUser": true,
Expand Down Expand Up @@ -679,7 +679,7 @@ func processAST(filename string, f *ast.File, services servicesMap, endpoints en
}
endpointName := decl.Name.Name
fullName := fmt.Sprintf("%v.%v", serviceName, endpointName)
if methodBlacklist[fullName] {
if skipMethods[fullName] {
logf("skipping %v", fullName)
continue
}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载