Skip to content

shorter return when meet if #7

@baishuai

Description

@baishuai

https://github.com/g0hacker/goc2p/blob/master/src/basic/map1/omap.go#L38

return omap.elemType == reflect.TypeOf(e)

this is better than

if reflect.TypeOf(e) != omap.elemType {
	return false
}
return true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions