Skip to content

Conversation

@Vaxuite
Copy link
Collaborator

@Vaxuite Vaxuite commented Aug 17, 2021

No description provided.

@@ -0,0 +1,6 @@
module easteregg
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 this file being committed? it's supposed to be a temporary file

}
buildDir = fmt.Sprintf("third_party/go/%s", pathMinusEnd)
} else {
buildDir = "third_party/go"
Copy link
Owner

Choose a reason for hiding this comment

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

think this would be neater if we just instantiated buildDir := "third_party/go" and then modified it if not single file build?

}
buildDir = fmt.Sprintf("third_party/go/%s", pathMinusEnd)
} else {
buildDir = "third_party/go"
Copy link
Owner

Choose a reason for hiding this comment

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

same here

}
if major == "v1" && existingMajor == "v0" {
delete(vd.versions, existingVers)
vd.versions[version] = mod
Copy link
Owner

Choose a reason for hiding this comment

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

wouldn't we then want to return mod here?


// Sync is a lazy implementation to refresh all of the module dependencies to the closest semver.
func (d *Directory) Sync() {
names := make(map[string]bool, 0)
Copy link
Owner

Choose a reason for hiding this comment

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

as a nit, for these maps which are only use to check if a key has been "seen", it's generally better practice to have it be map[string]struct{} as then you don't need to worry about what the value is, just whether or not the key exists.

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.

4 participants