Merge pull request #5046 from tpounds/use-built-in-schema-string-hash

Use built-in schema.HashString instead of custom hash functions.
This commit is contained in:
Paul Hinze 2016-02-12 07:58:34 -06:00
commit f5efe52f08

View file

@ -85,7 +85,7 @@ func resourceDockerContainer() *schema.Resource {
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: stringSetHash,
Set: schema.HashString,
},
"publish_all_ports": &schema.Schema{
@ -225,7 +225,7 @@ func resourceDockerContainer() *schema.Resource {
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: stringSetHash,
Set: schema.HashString,
},
"links": &schema.Schema{
@ -233,7 +233,7 @@ func resourceDockerContainer() *schema.Resource {
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: stringSetHash,
Set: schema.HashString,
},
"ip_address": &schema.Schema{
@ -339,7 +339,7 @@ func resourceDockerContainer() *schema.Resource {
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: stringSetHash,
Set: schema.HashString,
},
},
}
@ -407,7 +407,3 @@ func resourceDockerVolumesHash(v interface{}) int {
return hashcode.String(buf.String())
}
func stringSetHash(v interface{}) int {
return hashcode.String(v.(string))
}