Skip to content

Retrieve parent keys available to a child section#52

Merged
unknwon merged 1 commit into
go-ini:masterfrom
ata18:master
Jun 1, 2016
Merged

Retrieve parent keys available to a child section#52
unknwon merged 1 commit into
go-ini:masterfrom
ata18:master

Conversation

@ata18

@ata18 ata18 commented Jun 1, 2016

Copy link
Copy Markdown
Contributor

This PR lets us retrieve a list of parent keys that are
available to the child section.

Comment thread key_test.go Outdated
Convey("Get parent-keys that are available to the child section", func() {
parentKeys := cfg.Section("package.sub").ParentKeys()
for _, k := range parentKeys {
So(k.Name(), ShouldEqual, fmt.Sprintf("%s", "CLONE_URL"))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you can replace fmt.Sprintf("%s", "CLONE_URL") with "CLONE_URL", plain text string does not need format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@unknwon

unknwon commented Jun 1, 2016

Copy link
Copy Markdown
Member

Other than that, LGTM.

This PR lets us retrieve a list of parent keys that are
available to the child section.
@unknwon

unknwon commented Jun 1, 2016

Copy link
Copy Markdown
Member

Thanks, will tag the version ASAP.

@unknwon unknwon merged commit d291594 into go-ini:master Jun 1, 2016
@ata18

ata18 commented Jun 1, 2016

Copy link
Copy Markdown
Contributor Author

Thank you!

unknwon added a commit that referenced this pull request Jun 1, 2016
@unknwon

unknwon commented Jun 1, 2016

Copy link
Copy Markdown
Member

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