Files
John Sirois 494ba5f010 Support multiple --amazonec2-security-groups.
Maintains support for loading old Driver config.json that use the
singular `SecurityGroupName` field, but also adds a new plural
`SecurityGroupNames` field.

This change also bumps to latest stretchr/testify, in the course of
adding a dep on stretchr/testify/mock to help test the modified
`configureSecurityGroups` code.

The unused `deleteSecurityGroup` is dropped as well.

Signed-off-by: John Sirois <john.sirois@gmail.com>
Signed-off-by: Bill Farner <terasurfer@gmail.com>
2016-03-02 23:30:28 -07:00

18 lines
362 B
Go

package objx
// Has gets whether there is something at the specified selector
// or not.
//
// If m is nil, Has will always return false.
func (m Map) Has(selector string) bool {
if m == nil {
return false
}
return !m.Get(selector).IsNil()
}
// IsNil gets whether the data is nil or not.
func (v *Value) IsNil() bool {
return v == nil || v.data == nil
}