Skip to content

Commit

Permalink
fix(helpers): remove extra quotes on flatten (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sh4d1 authored and jerome-quere committed Dec 4, 2019
1 parent bfc356b commit 390f193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scaleway/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ func expandIPNet(raw string) scw.IPNet {
err := json.Unmarshal([]byte(raw), &ipNet)
if err != nil {
// We panic as this should never happen. Data from state should be validate using a validate func
panic(err)
panic(fmt.Errorf("%s could not be marshaled: %v", raw, err))
}

return ipNet
Expand All @@ -604,7 +604,7 @@ func flattenIpNet(ipNet scw.IPNet) string {
// We panic as this should never happen.
panic(err)
}
return string(raw)
return string(raw[1 : len(raw)-1])
}

func diffSuppressFuncDuration(k, old, new string, d *schema.ResourceData) bool {
Expand Down

0 comments on commit 390f193

Please sign in to comment.