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

implement TailProcessStdoutLog and add go mod #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

beaquant
Copy link

No description provided.

Copy link
Owner

@abrander abrander left a 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
Copy link
Owner

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.
Copy link
Owner

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.

if err != nil {
return "", err
}
return ret[0].(string), nil
Copy link
Owner

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)
Copy link
Owner

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..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants