Skip to content

Move type Map out of type_specific_codegen.go#73

Merged
hanzei merged 2 commits into
stretchr:masterfrom
geseq:Type-Specific-Map
May 28, 2018
Merged

Move type Map out of type_specific_codegen.go#73
hanzei merged 2 commits into
stretchr:masterfrom
geseq:Type-Specific-Map

Conversation

@geseq

@geseq geseq commented May 28, 2018

Copy link
Copy Markdown
Collaborator

I've moved all MSI and ObjxMap functions to type_specific.go and added additional code for getting either types from the other within the objx.Map. Added additional tests as well.

Fixes #70

@geseq

geseq commented May 28, 2018

Copy link
Copy Markdown
Collaborator Author

This should take care of #70

@hanzei hanzei self-requested a review May 28, 2018 11:32
@hanzei hanzei added this to the v0.2 milestone May 28, 2018

@hanzei hanzei left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just two minor things

Comment thread type_specific.go Outdated

// MSI gets the value as a map[string]interface{}, returns the optionalDefault
// value or a system default object if the value is the wrong type.
// TODO: Find a better solution for the Map type as this code is autogenerated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you remove this comment?

Comment thread type_specific.go Outdated
// ObjxMapSlice gets the value as a [](Map), returns the optionalDefault
// value or nil if the value is not a [](Map).
func (v *Value) ObjxMapSlice(optionalDefault ...[](Map)) [](Map) {
// TODO: Find a better solution for the Map type as this code is autogenerated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you remove this comment?

@geseq

geseq commented May 28, 2018

Copy link
Copy Markdown
Collaborator Author

Removed the comments.

@hanzei hanzei self-assigned this May 28, 2018
@hanzei hanzei merged commit c8db58a into stretchr:master May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants