-
Notifications
You must be signed in to change notification settings - Fork 702
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
Misc todo cleanup in fluxv2 plugin #3030
Misc todo cleanup in fluxv2 plugin #3030
Conversation
} | ||
repo.Namespace = namespace | ||
|
||
repoPackages, err := readPackagesFromRepoIndex(&repo, url) |
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.
Probably worth a TODO at the start of the surrounding iteration that each repo should be read in a separate go routine, if this code is used in the future.
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.
will do
pkg/http-client/httpclient.go
Outdated
) | ||
|
||
type Client interface { | ||
Do(req *http.Request) (*http.Response, error) | ||
} | ||
|
||
// | ||
// creates a new instance of Client, given a path to addtional certificates | ||
// certFile may be empty string, which means no additional certs will be used |
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 this copy-n-paste needs updating :)
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.
indeed
pkg/http-client/httpclient.go
Outdated
// | ||
// creates a new instance of Client, given a path to addtional certificates | ||
// certFile may be empty string, which means no additional certs will be used | ||
// |
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.
Just note that generally golang docstrings are not preceded with an empty //\n
line (nor followed by one), and usually begin with the function/struct/constant name, such as:
// Foo does stuff before returning nil
// Extra details about Foo here.
func Foo() nil
See https://blog.golang.org/godoc for the background, but it just plays well with the godoc
binary.
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.
mmm, maybe, but it makes code easier to read. Oh well, when in Rome 👍 I will change it
I wanted to clean up and merge some todo items leftover from the previous PR before I embark on a new big task to add caching layer to fluxv2 plug-in