…..\backend\utils\files\fileinfo.go:87:47: undefined: syscall.Stat_t
…..\backend\utils\files\fileinfo.go:88:61: undefined: syscall.Stat_t
…..\backend\utils\files\fileinfo.go:89:61: undefined: syscall.Stat_t
…..\backend\utils\files\fileinfo.go:90:44: undefined: syscall.Stat_t
…..\backend\utils\files\fileinfo.go:272:46: undefined: syscall.Stat_t
…..\backend\utils\files\fileinfo.go:273:43: undefined: syscall.Stat_t
…..\backend\utils\files\fileinfo.go:274:60: undefined: syscall.Stat_t
…..\backend\utils\files\fileinfo.go:275:60: undefined: syscall.Stat_t
…..\backend\utils\terminal\local_cmd.go:76:11: undefined: syscall.SYS_IOCTL
…..\backend\utils\terminal\local_cmd.go:78:11: undefined: syscall.TIOCSWINSZ
…..\backend\utils\terminal\local_cmd.go:79:3: not enough arguments in call to syscall.Syscall
have (unknown type, uintptr, unknown type, uintptr)
want (uintptr, uintptr, uintptr, uintptr, uintptr)
GO开发环境启动失败,按照开发文档运行的失败
GO版本:1.22.2
nodejs:21.7.3
npm:10.5
GoLand IDEA2024.1
windows 11
我跟着开发文档走了下,应该可以看作实际上不支持 macOS 开发的,文档中没提只能在 Linux 下开发,可能完全不必说吧,因为 1Panel 是个 Linux 面板,当然只考虑 Linux。
➜ 1Panel git:(dev) go run cmd/server/main.go
panic: error `BASE_DIR` find in /usr/local/bin/1pctl
goroutine 1 [running]:
github.com/1Panel-dev/1Panel/backend/init/viper.loadParams({0x104490318, 0x8})
/Users/xcy/Work/1Panel/backend/init/viper/viper.go:116 +0xf8
github.com/1Panel-dev/1Panel/backend/init/viper.Init()
/Users/xcy/Work/1Panel/backend/init/viper/viper.go:43 +0x224
github.com/1Panel-dev/1Panel/backend/server.Start()
/Users/xcy/Work/1Panel/backend/server/server.go:35 +0x24
github.com/1Panel-dev/1Panel/cmd/server/cmd.init.func12(0x14001470d00?, {0x104481a3e?, 0x4?, 0x104481926?})
/Users/xcy/Work/1Panel/cmd/server/cmd/root.go:25 +0x1c
github.com/spf13/cobra.(*Command).execute(0x10867dce0, {0x140001ac150, 0x0, 0x0})
/Users/xcy/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983 +0x834
github.com/spf13/cobra.(*Command).ExecuteC(0x10867dce0)
/Users/xcy/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(0x1400009cf38?)
/Users/xcy/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039 +0x1c
main.main()
/Users/xcy/Work/1Panel/cmd/server/main.go:41 +0x24
exit status 2
➜ 1Panel git:(dev)