Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Jan 24, 2017
1 parent d276b3f commit 6082b46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 2 additions & 8 deletions command/agent/fs_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 2 additions & 3 deletions website/source/docs/http/client-fs.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 6082b46

Please sign in to comment.