-
Notifications
You must be signed in to change notification settings - Fork 13
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
implement TailProcessStdoutLog and add go mod #5
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
It's a nice addition. I have outlined a few questions that need to be addressed before we can merge.
@@ -0,0 +1,5 @@ | |||
module github.com/abrander/go-supervisord | |||
|
|||
go 1.16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually require Go 1.16 for anything..? I'm not that familiar with modules - but can you use this with a Go version older than 1.16?
@@ -20,8 +20,14 @@ func (c *Client) ReadProcessStderrLog(name string, offset int, length int) (stri | |||
} | |||
|
|||
// This is not implemented yet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should update the comment.
processlogging.go
Outdated
if err != nil { | ||
return "", err | ||
} | ||
return ret[0].(string), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure as to why you only return the first member of the slice..?
func (c *Client) TailProcessStdoutLog(name string, offset int, length int) ([]LogSegment, error) { | ||
return nil, FIXMENotImplementedError | ||
func (c *Client) TailProcessStdoutLog(name string, offset int, length int) (string, error) { | ||
ret := make([]interface{}, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is interface{}
needed? You're type asserting to string
below..?
No description provided.