mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 17:02:20 +08:00

* Use cog for Go types * Delete old generation code * Fix plugins generation * workspaces update * Update datasources with new generated code * More fixes * Update swagger and openapi specs * Fixes * More files... * Update workspace * More fixes... * Remove unused functions
14 lines
331 B
Go
14 lines
331 B
Go
package utils
|
|
|
|
import "github.com/go-stack/stack"
|
|
|
|
func Pointer[T any](arg T) *T { return &arg }
|
|
|
|
// Stack is copied from grafana/pkg/infra/log
|
|
// TODO: maybe this should live in grafana-plugin-sdk-go?
|
|
func Stack(skip int) string {
|
|
call := stack.Caller(skip)
|
|
s := stack.Trace().TrimBelow(call).TrimRuntime()
|
|
return s.String()
|
|
}
|