lint code

This commit is contained in:
Javier Provecho Fernandez
2016-04-15 01:16:46 +02:00
parent 89f1adf0eb
commit 9e930b9bdd
17 changed files with 72 additions and 73 deletions
+3 -1
View File
@@ -20,7 +20,7 @@ type Param struct {
// It is therefore safe to read values by the index.
type Params []Param
// ByName returns the value of the first Param which key matches the given name.
// Get returns the value of the first Param which key matches the given name.
// If no matching Param is found, an empty string is returned.
func (ps Params) Get(name string) (string, bool) {
for _, entry := range ps {
@@ -31,6 +31,8 @@ func (ps Params) Get(name string) (string, bool) {
return "", false
}
// ByName returns the value of the first Param which key matches the given name.
// If no matching Param is found, an empty string is returned.
func (ps Params) ByName(name string) (va string) {
va, _ = ps.Get(name)
return