Skip to content

Commit

Permalink
Simplify cast to string
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Foord committed Apr 28, 2016
1 parent fbad5cb commit b15beb7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,8 @@ func filesystem2_0(source map[string]interface{}) (*filesystem, error) {
valid := coerced.(map[string]interface{})
// From here we know that the map returned from the schema coercion
// contains fields of the right type.
mount_point, ok := valid["mount_point"].(string)
if !ok {
mount_point = ""
}
label, ok := valid["label"].(string)
if !ok {
label = ""
}
mount_point, _ := valid["mount_point"].(string)
label, _ := valid["label"].(string)
result := &filesystem{
fstype: valid["fstype"].(string),
mountPoint: mount_point,
Expand Down

0 comments on commit b15beb7

Please sign in to comment.