-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fff156
commit cabe1c9
Showing
405 changed files
with
125,653 additions
and
5,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package main | ||
|
||
import ( | ||
"bufio" | ||
"io" | ||
) | ||
|
||
func newEventStreamBody(delegate io.ReadCloser) io.ReadCloser { | ||
return &eventStreamBody{delegate: delegate} | ||
} | ||
|
||
type eventStreamBody struct { | ||
delegate io.ReadCloser | ||
} | ||
|
||
func (esb *eventStreamBody) WriteTo(w io.Writer) (n int64, err error) { | ||
|
||
reader := bufio.NewReader(esb.delegate) | ||
var line []byte | ||
var written int | ||
|
||
for { | ||
line, err = reader.ReadBytes('\n') | ||
if err != nil { | ||
return | ||
} | ||
written, err = w.Write(line) | ||
if err != nil { | ||
return | ||
} | ||
n += int64(written) | ||
} | ||
} | ||
|
||
func (esb *eventStreamBody) Read(p []byte) (n int, err error) { | ||
return esb.delegate.Read(p) | ||
} | ||
|
||
func (esb *eventStreamBody) Close() error { | ||
return esb.delegate.Close() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"memo": "3b356f8f31402acfca5616d9e008aa02f1057c4e697a036aa3c55a55f1a38505", | ||
"projects": [ | ||
{ | ||
"name": "github.com/Sirupsen/logrus", | ||
"version": "v0.10.0", | ||
"revision": "4b6ea7319e214d98c938f12692336f7ca9348d6b", | ||
"packages": [ | ||
"." | ||
] | ||
}, | ||
{ | ||
"name": "github.com/elazarl/goproxy", | ||
"revision": "4327d5f85a6da046b9b4818382a3e51f795a249b", | ||
"packages": [ | ||
"." | ||
] | ||
}, | ||
{ | ||
"name": "github.com/stretchr/testify", | ||
"revision": "1297dc01ed0a819ff634c89707081a4df43baf6b", | ||
"packages": [ | ||
"assert" | ||
] | ||
}, | ||
{ | ||
"name": "github.com/urfave/cli", | ||
"branch": "master", | ||
"revision": "0bdeddeeb0f650497d603c4ad7b20cfe685682f6", | ||
"packages": [ | ||
"." | ||
] | ||
}, | ||
{ | ||
"name": "golang.org/x/sys", | ||
"revision": "98fc11432b951eb53c62602ba4ae99d03c1fb7e2", | ||
"packages": [ | ||
"unix" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"dependencies": { | ||
"github.com/Sirupsen/logrus": { | ||
"version": ">=0.10.0, <1.0.0" | ||
}, | ||
"github.com/elazarl/goproxy": { | ||
"revision": "4327d5f85a6da046b9b4818382a3e51f795a249b" | ||
}, | ||
"github.com/stretchr/testify": { | ||
"revision": "1297dc01ed0a819ff634c89707081a4df43baf6b" | ||
}, | ||
"github.com/urfave/cli": { | ||
"branch": "master" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.