aboutsummaryrefslogtreecommitdiffhomepage
path: root/common
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-12-18 17:41:15 +0100
committerBjørn Erik Pedersen <[email protected]>2023-12-18 19:51:26 +0100
commit8adba648cc130a97d2c814c65aa8396044c251fd (patch)
tree95415853e28ee83e0342cc55944f3bc16d746f4f /common
parent6f13430d4a3b0d8b196f13958fbfb6478be1f3aa (diff)
downloadhugo-8adba648cc130a97d2c814c65aa8396044c251fd.tar.gz
hugo-8adba648cc130a97d2c814c65aa8396044c251fd.zip
all: Remove unused code
Using x/tools/cmd/deadcode
Diffstat (limited to 'common')
-rw-r--r--common/herrors/errors.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/common/herrors/errors.go b/common/herrors/errors.go
index 598c50b32..8e62b2c99 100644
--- a/common/herrors/errors.go
+++ b/common/herrors/errors.go
@@ -15,14 +15,12 @@
package herrors
import (
- "bytes"
"errors"
"fmt"
"io"
"os"
"runtime"
"runtime/debug"
- "strconv"
)
// PrintStackTrace prints the current stacktrace to w.
@@ -49,16 +47,6 @@ func Recover(args ...any) {
}
}
-// GetGID the current goroutine id. Used only for debugging.
-func GetGID() uint64 {
- b := make([]byte, 64)
- b = b[:runtime.Stack(b, false)]
- b = bytes.TrimPrefix(b, []byte("goroutine "))
- b = b[:bytes.IndexByte(b, ' ')]
- n, _ := strconv.ParseUint(string(b), 10, 64)
- return n
-}
-
// IsFeatureNotAvailableError returns true if the given error is or contains a FeatureNotAvailableError.
func IsFeatureNotAvailableError(err error) bool {
return errors.Is(err, &FeatureNotAvailableError{})