当前位置:网站首页>Easynvr and easyrtc platforms use go language to manage projects. Summary of the use of govendor and gomod

Easynvr and easyrtc platforms use go language to manage projects. Summary of the use of govendor and gomod

2022-06-24 08:38:00 Tsingsee green rhino video

TSINGSEE Qingxi video cloud edge architecture system products , Streaming media platforms all use Go Language development , Because of the problem of legacy code ,EasyNVR、EasyDSS And other platforms need to use govendor Project management of code , and EasyRTC And other new projects adopt gomod Development . The following is our platform development process , A summary of the use of both , Now share with you .

GoVendor The basic use of :

govendor init  Initialize project 
govendor fetch  Increased reliance on 
govendor remove  Delete package dependency 
govendor update  Update package dependency 
govendor list  List the package 
govendor stat  Check whether the package has expired 
./vendor/vendor.json  Dependency package 
govendor --help

gomod The use of :

go mod download     Download dependent module To local cache( The default is $GOPATH/pkg/mod Catalog )
go mod edit         edit go.mod file 
    go mod edit -fmt  format 
    go mod edit -require=golang.org/x/text  Add dependency 
    go mod edit -droprequire=golang.org/x/text  Remove dependencies 
go mod graph        Print module dependency graph 
go mod init         Initialize the current folder ,  establish go.mod file 
go mod tidy         Increase the lack of module, Delete useless module
go mod vendor       Copy dependency to vendor Next 
go mod verify       Verification dependency 
go mod why          Explain why you need to rely 
go.mod  Dependency package 
gp.sum  Dependency package 
go get -u /sadas/asfasdfdsa  Update dependency 

gomod Project management tools recommended by the government , With go1.16 Appearance , It is recommended that all projects adopt gomod Project management . Because some websites are inaccessible , Therefore, adding the following configuration when using can solve this problem : GOPROXY=https://goproxy.cn,direct;GONOSUMDB=gitlab.com,gitee.com;GONOPROXY=gitlab.com,gitee.com

EasyNVR、EasyDSS Are mature and stable video streaming media platforms , You can download the test directly ,EasyRTC The reproduction of is still under development , Its architecture has a new direction , In the near future, the new version will also be online to meet you ,TSINGSEE Green rhino video cloud side architecture, the whole platform is welcome to test and understand .

原网站

版权声明
本文为[Tsingsee green rhino video]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/06/20210622172018833F.html