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

param: Pointers are not parameter objects #83

Merged
merged 1 commit into from Jun 2, 2017
Merged

param: Pointers are not parameter objects #83

merged 1 commit into from Jun 2, 2017

Conversation

abhinav
Copy link
Collaborator

@abhinav abhinav commented Jun 1, 2017

Copy of #81. Will land as a separate commit on dev once #73 lands.

@coveralls
Copy link

coveralls commented Jun 1, 2017

Coverage Status

Coverage decreased (-0.1%) to 92.417% when pulling 4ff4da6 on param-ptrs into 9d83d4b on param-obj-new.

@@ -357,12 +354,12 @@ func (c *Container) createParamObject(t reflect.Type) (reflect.Value, error) {
case "true", "yes":
Copy link
Contributor

Choose a reason for hiding this comment

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

Side question: why are we supporting both of these values? If we want to support multiple values, why don't we just use strconv.ParseBool and accept all the usual truthy strings?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call. Will change in a different PR.

This narrows down the definition of parameter objects to only structs
embedding `dig.Param`. Pointers to structs embedding `dig.Param` are
treated like any other struct pointer.
@abhinav abhinav changed the base branch from param-obj-new to dev June 2, 2017 00:00
@abhinav abhinav merged commit bd55fde into dev Jun 2, 2017
@abhinav abhinav deleted the param-ptrs branch June 2, 2017 00:00
hbdf pushed a commit to hbdf/dig that referenced this pull request Jul 14, 2022
hbdf pushed a commit to hbdf/dig that referenced this pull request Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants