Use built-in schema.HashString.

This commit is contained in:
Trevor Pounds 2016-02-07 15:51:26 -08:00
parent f763cd8b35
commit 5e0b6e3750

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))
}