Adds golint suggestions
This commit is contained in:
parent
1309adde4e
commit
3cbc5e2ab0
4
main.go
4
main.go
|
@ -14,7 +14,7 @@ type Link struct {
|
||||||
|
|
||||||
// HasParam returns if a Link has a particular parameter or not
|
// HasParam returns if a Link has a particular parameter or not
|
||||||
func (l Link) HasParam(key string) bool {
|
func (l Link) HasParam(key string) bool {
|
||||||
for p, _ := range l.Params {
|
for p := range l.Params {
|
||||||
if p == key {
|
if p == key {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ func (l Link) Param(key string) (string, error) {
|
||||||
return "", fmt.Errorf("Could not find param '%s'", key)
|
return "", fmt.Errorf("Could not find param '%s'", key)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type Links is a slice of Link structs
|
// Links is a slice of Link structs
|
||||||
type Links []Link
|
type Links []Link
|
||||||
|
|
||||||
// FilterByRel filters a group of Links by the provided Rel attribute
|
// FilterByRel filters a group of Links by the provided Rel attribute
|
||||||
|
|
Loading…
Reference in New Issue
Block a user