Skip to content

Commit 9e58a5b

Browse files
rcohenmadshelbyo
authored andcommitted
consolidating enum patterns
1 parent c8e6c4d commit 9e58a5b

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

oci/dns_zones_data_source.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ func (s *ZonesDataSourceCrud) Get() error {
115115
}
116116

117117
if state, ok := s.D.GetOkExists("state"); ok {
118-
tmp := state.(string)
119-
request.LifecycleState = oci_dns.ListZonesLifecycleStateEnum(tmp)
118+
request.LifecycleState = oci_dns.ListZonesLifecycleStateEnum(state.(string))
120119
}
121120

122121
if timeCreatedGreaterThanOrEqualTo, ok := s.D.GetOkExists("time_created_greater_than_or_equal_to"); ok {

oci/identity_auth_tokens_data_source.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ func (s *AuthTokensDataSourceCrud) SetData() error {
111111
resources = ApplyFilters(f.(*schema.Set), resources, AuthTokensDataSource().Schema["tokens"].Elem.(*schema.Resource).Schema)
112112
}
113113

114-
// @CODEGEN 06/2018: auth_tokens => tokens
115114
if err := s.D.Set("tokens", resources); err != nil {
116115
return err
117116
}

oci/identity_compartments_data_source.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ func (s *CompartmentsDataSourceCrud) Get() error {
5858
request := oci_identity.ListCompartmentsRequest{}
5959

6060
if accessLevel, ok := s.D.GetOkExists("access_level"); ok {
61-
tmp := accessLevel.(string)
62-
request.AccessLevel = oci_identity.ListCompartmentsAccessLevelEnum(tmp)
61+
request.AccessLevel = oci_identity.ListCompartmentsAccessLevelEnum(accessLevel.(string))
6362
}
6463

6564
if compartmentId, ok := s.D.GetOkExists("compartment_id"); ok {

0 commit comments

Comments
 (0)