Files
podux/internal/application/version/service.go
T
2026-03-02 17:40:35 +08:00

31 lines
437 B
Go

package version
import (
"runtime/debug"
"github.com/pocketbase/pocketbase/core"
)
type Service struct {
app core.App
}
func NewService(app core.App) *Service {
return &Service{app: app}
}
func (s *Service) GetFrpVersion() string {
info, ok := debug.ReadBuildInfo()
if !ok {
return "unknown"
}
for _, dep := range info.Deps {
if dep.Path == "github.com/fatedier/frp" {
return dep.Version
}
}
return "unknown"
}