updated comments for Get function for params (#2756)

This commit is contained in:
Ashwani 2021-06-23 09:06:24 +05:30 committed by wei
parent 252de91779
commit dd401debc8

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 {