Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass on data received before EOF, which is not terminated by a newline #421

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build-custom:
cd custom && docker build -t $(NAME):custom .

lint:
test -x $(GOPATH)/bin/golint || go get github.com/golang/lint/golint
test -x $(GOPATH)/bin/golint || go get golang.org/x/lint/golint
go get \
&& go install $(GOPACKAGES) \
&& go tool vet -v $(shell ls -d */ | egrep -v 'custom|vendor/' | xargs $(XARGS_ARG))
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- checkout
- run: |
go get github.com/golang/lint/golint
go get golang.org/x/lint/golint
- run: |
make circleci
- run: |
Expand Down
9 changes: 9 additions & 0 deletions router/pump.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,15 @@ func newContainerPump(container *docker.Container, stdout, stderr io.Reader) *co
if err != io.EOF {
debug("pump.newContainerPump():", normalID(container.ID), source+":", err)
}
debug("Got EOF and had read: '" + line + "'")
if len(line) > 0 {
cp.send(&Message{
Data: strings.TrimSuffix(line, "\n"),
Container: container,
Time: time.Now(),
Source: source,
})
}
return
}
cp.send(&Message{
Expand Down