Review feedback

This commit is contained in:
Alex Dadgar 2017-01-23 16:58:53 -08:00
parent 9152477890
commit c61f8d2526
2 changed files with 4 additions and 11 deletions

View file

@ -721,22 +721,16 @@ func (s *HTTPServer) Logs(resp http.ResponseWriter, req *http.Request) (interfac
return nil, taskNotPresentErr
}
followStr := q.Get("follow")
if followStr != "" {
if followStr := q.Get("follow"); followStr != "" {
if follow, err = strconv.ParseBool(followStr); err != nil {
return nil, fmt.Errorf("Failed to parse follow field to boolean: %v", err)
}
}
plainStr := q.Get("plain")
if plainStr != "" {
if plainStr := q.Get("plain"); plainStr != "" {
if plain, err = strconv.ParseBool(plainStr); err != nil {
return nil, fmt.Errorf("Failed to parse plain field to boolean: %v", err)
}
if plain {
follow = false
}
}
logType = q.Get("type")

View file

@ -229,9 +229,8 @@ allocation was placed.
</li>
<li>
<span class="param">plain</span>
A boolean of whether to return just the plain text without framing. If
set, follow is automatically unset. This can be usef when viewing logs
in a browser.
A boolean of whether to return just the plain text without framing.
This can be usef when viewing logs in a browser.
</li>
</ul>
</dd>