mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
fix REST API permission checks (#209)
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
package domain
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
var ErrNotFound = errors.New("record not found")
|
||||
var ErrNotUnique = errors.New("record not unique")
|
||||
|
||||
// GetStackTrace returns a stack trace of the current goroutine. The stack trace has at most 1024 bytes.
|
||||
func GetStackTrace() string {
|
||||
b := make([]byte, 1024)
|
||||
n := runtime.Stack(b, false)
|
||||
s := string(b[:n])
|
||||
|
||||
return s
|
||||
}
|
||||
|
Reference in New Issue
Block a user