updated comments for Get function for params (#2756)

This commit is contained in:
Ashwani 2021-06-23 09:06:24 +05:30 committed by GitHub
parent 61a0cda75a
commit a8857ed70a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,8 +30,8 @@ type Param struct {
// It is therefore safe to read values by the index. // It is therefore safe to read values by the index.
type Params []Param type Params []Param
// Get 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 and a boolean true.
// If no matching Param is found, an empty string is returned. // If no matching Param is found, an empty string is returned and a boolean false .
func (ps Params) Get(name string) (string, bool) { func (ps Params) Get(name string) (string, bool) {
for _, entry := range ps { for _, entry := range ps {
if entry.Key == name { if entry.Key == name {