Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Brocker committed Jun 30, 2023
1 parent f98b55a commit a4e0f2c
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions internal/provider/workspacegroups/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"fmt"
"net/http"
"strconv"

"github.com/google/uuid"
"github.com/hashicorp/terraform-plugin-framework/path"
Expand Down Expand Up @@ -393,17 +392,8 @@ func toManagementUpdateWindow(uw *updateWindowDataSourceModel) *management.Updat
return nil
}

day, err := strconv.Atoi(fmt.Sprint(uw.Hour))
if err != nil {
return nil
}
hour, err := strconv.Atoi(fmt.Sprint(uw.Hour))
if err != nil {
return nil
}

return &management.UpdateWindow{
Hour: float32(day),
Day: float32(hour),
Hour: float32(uw.Hour.ValueInt64()),
Day: float32(uw.Day.ValueInt64()),
}
}

0 comments on commit a4e0f2c

Please sign in to comment.