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

Misc todo cleanup in fluxv2 plugin #3030

Merged
merged 8 commits into from
Jun 23, 2021

Conversation

gfichtenholt
Copy link
Contributor

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

@gfichtenholt gfichtenholt self-assigned this Jun 23, 2021
@gfichtenholt gfichtenholt added this to In progress in Kubeapps via automation Jun 23, 2021
@gfichtenholt gfichtenholt changed the title Misc todo cleanup Misc todo cleanup in fluxv2 plugin Jun 23, 2021
}
repo.Namespace = namespace

repoPackages, err := readPackagesFromRepoIndex(&repo, url)
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

)

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
Copy link
Contributor

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 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed

//
// 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
//
Copy link
Contributor

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.

Copy link
Contributor Author

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

@gfichtenholt gfichtenholt merged commit 4547597 into vmware-tanzu:master Jun 23, 2021
Kubeapps automation moved this from In progress to Done Jun 23, 2021
@gfichtenholt gfichtenholt deleted the misc-todo-cleanup branch June 23, 2021 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Kubeapps
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants