Skip to content

Commit 4864ccc

Browse files
committed
refactor: remove unused pointer conversion and simplify TTL handling
1 parent 63a507c commit 4864ccc

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

internal/repository/rrset_repository.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (r *rrSetRepository) CreateRRSet(
9191
}
9292
}
9393
}
94-
ttl := int32(rrSet.Ttl)
94+
ttl := rrSet.Ttl
9595
payload := stackitdnsclient.CreateRecordSetPayload{
9696
Comment: rrSet.Comment,
9797
Name: rrSet.Name,
@@ -117,7 +117,7 @@ func (r *rrSetRepository) UpdateRRSet(
117117
Content: record.Content,
118118
}
119119
}
120-
ttl := int32(rrSet.Ttl)
120+
ttl := rrSet.Ttl
121121
payload := stackitdnsclient.PartialUpdateRecordSetPayload{
122122
Comment: rrSet.Comment,
123123
Name: &rrSet.Name,

internal/resolver/resolver_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,10 +691,6 @@ func (s *cleanSuite) TestCleanUp_KeyNotFound_DoesNothing() {
691691
s.NoError(err)
692692
}
693693

694-
func toPtr(str string) *string {
695-
return &str
696-
}
697-
698694
func matchedBy[T any](fn func(T) bool) gomock.Matcher {
699695
return matcher[T]{fn}
700696
}

0 commit comments

Comments
 (0)