소스 검색

fix linux build failed when cgo disable (#453)

silenceper 4 년 전
부모
커밋
39dbfd1c13
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      work/msgaudit/client_unsupport.go

+ 2 - 2
work/msgaudit/client_unsupport.go

@@ -1,4 +1,4 @@
-// +build !linux
+// +build !linux linux,!cgo
 
 //Package msgaudit for unsupport platform
 package msgaudit
@@ -15,5 +15,5 @@ type Client struct {
 
 // NewClient new
 func NewClient(cfg *config.Config) (*Client, error) {
-	return nil, fmt.Errorf("会话存档功能目前只支持Linux平台运行")
+	return nil, fmt.Errorf("会话存档功能目前只支持Linux平台运行,并且打开设置CGO_ENABLED=1")
 }