Skip to content

Commit c48de1f

Browse files
committed
remove redundant type casts and parentheses
1 parent 1a28543 commit c48de1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

discord/resource_discord_channel.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ func resourceChannelUpdate(ctx context.Context, d *schema.ResourceData, m interf
295295
)
296296

297297
name = map[bool]string{true: d.Get("name").(string), false: channel.Name}[d.HasChange("name")]
298-
position = map[bool]int{true: int(d.Get("position").(int)), false: int(channel.Position)}[d.HasChange("position")]
298+
position = map[bool]int{true: d.Get("position").(int), false: channel.Position}[d.HasChange("position")]
299299

300300
switch channelType {
301301
case "text", "news":
@@ -305,8 +305,8 @@ func resourceChannelUpdate(ctx context.Context, d *schema.ResourceData, m interf
305305
}
306306
case "voice":
307307
{
308-
bitRate = map[bool]int{true: int(d.Get("bitrate").(int)), false: channel.Bitrate}[d.HasChange("bitrate")]
309-
userLimit = map[bool]int{true: int(d.Get("user_limit").(int)), false: channel.UserLimit}[d.HasChange("user_limit")]
308+
bitRate = map[bool]int{true: d.Get("bitrate").(int), false: channel.Bitrate}[d.HasChange("bitrate")]
309+
userLimit = map[bool]int{true: d.Get("user_limit").(int), false: channel.UserLimit}[d.HasChange("user_limit")]
310310
}
311311
}
312312

discord/resource_discord_role.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package discord
22

33
import (
4+
"context"
45
"github.com/bwmarrin/discordgo"
56
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
67
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
78
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
8-
"golang.org/x/net/context"
99
)
1010

1111
func resourceDiscordRole() *schema.Resource {

0 commit comments

Comments
 (0)