Skip to content

Commit

Permalink
Merge pull request #147 from Lucky3028/refactor-warnings
Browse files Browse the repository at this point in the history
Refactor warnings
  • Loading branch information
Lucky authored May 17, 2024
2 parents c8642d5 + eca7b19 commit ac0230f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions discord/resource_discord_channel_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ package discord

import (
"fmt"
"github.com/bwmarrin/discordgo"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"strconv"

"log"
"strconv"

"github.com/bwmarrin/discordgo"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"golang.org/x/net/context"
)

Expand Down Expand Up @@ -74,12 +73,14 @@ func resourceChannelPermissionCreate(ctx context.Context, d *schema.ResourceData
}

func resourceChannelPermissionRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
var diags diag.Diagnostics
client := m.(*Context).Session
var (
diags diag.Diagnostics
channelId string
overwriteId string
permissionType discordgo.PermissionOverwriteType
)

channelId := d.Get("channel_id").(string)
overwriteId := d.Get("overwrite_id").(string)
var permissionType discordgo.PermissionOverwriteType
client := m.(*Context).Session

cId, oId, pt, err := parseThreeIds(d.Id())
if err != nil {
Expand Down

0 comments on commit ac0230f

Please sign in to comment.