aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/common/misc/trivial.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-08-12 11:01:07 +0800
committerRunxi Yu <me@runxiyu.org>2025-09-15 15:19:12 +0800
commiteb82fdb2dc0903e6125014abd64aceab42c8eb35 (patch)
treec07276ba1595c415ebc28943163d88f3e3180254 /forged/internal/common/misc/trivial.go
parentRemove forge-specific functions from misc (diff)
downloadforge-eb82fdb2dc0903e6125014abd64aceab42c8eb35.tar.gz
forge-eb82fdb2dc0903e6125014abd64aceab42c8eb35.tar.zst
forge-eb82fdb2dc0903e6125014abd64aceab42c8eb35.zip
Refactor
Diffstat (limited to '')
-rw-r--r--forged/internal/common/misc/trivial.go (renamed from forged/internal/misc/trivial.go)4
1 files changed, 2 insertions, 2 deletions
diff --git a/forged/internal/misc/trivial.go b/forged/internal/common/misc/trivial.go
index e59c17e..83901e0 100644
--- a/forged/internal/misc/trivial.go
+++ b/forged/internal/common/misc/trivial.go
@@ -28,13 +28,13 @@ func QueryEscape(s string) string {
}
// Dereference dereferences a pointer.
-func Dereference[T any](p *T) T {
+func Dereference[T any](p *T) T { //nolint:ireturn
return *p
}
// DereferenceOrZero dereferences a pointer. If the pointer is nil, the zero
// value of its associated type is returned instead.
-func DereferenceOrZero[T any](p *T) T {
+func DereferenceOrZero[T any](p *T) T { //nolint:ireturn
if p != nil {
return *p
}