Skip to content

Commit

Permalink
Minor clean up
Browse files Browse the repository at this point in the history
- `quoteStrings` already defined outside on package scope
  • Loading branch information
sogko authored and chris-ramon committed Mar 15, 2017
1 parent 7be4d3e commit 71a0ed1
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,6 @@ func quoteStrings(slice []string) []string {
}
func UndefinedFieldMessage(fieldName string, ttypeName string, suggestedTypes []string, suggestedFields []string) string {

quoteStrings := func(slice []string) []string {
quoted := []string{}
for _, s := range slice {
quoted = append(quoted, fmt.Sprintf(`"%v"`, s))
}
return quoted
}

// construct helpful (but long) message
message := fmt.Sprintf(`Cannot query field "%v" on type "%v".`, fieldName, ttypeName)
const MaxLength = 5
if len(suggestedTypes) > 0 {
Expand Down

0 comments on commit 71a0ed1

Please sign in to comment.