草庐IT

msg_chan

全部标签

msg:xxl-job remoting error(connect timed out), for url : http://169.254.104.1:8900/run

 问题如上。xxl-job是部署在腾讯云服务器上的,但是web程序在本地。在不同局域网中。内网穿透解决。注意,这两个端口需要和yaml文件中配置的port一致,port默认是9999,可以自己修改。然后,获取对应的域名(这里webinterface会显示对应的ip:端口,显示disable的肯定是不行的) 将这个域名手动配置到执行器的机器地址栏 最后添加任务管理就可以了

go - 关闭 chan 时出现死锁

我想了解为什么这种情况会陷入僵局,而另一种情况却不会。如果我在goroutine中关闭channel,它工作正常,但如果我在WaitGroup.Wait()之后关闭它会导致死锁。packagemainimport("fmt""io/ioutil""os""sync")var(wg=sync.WaitGroup{}links=make(chanstring))funcrec_readdir(depthint,pathstring){files,_:=ioutil.ReadDir(path)for_,f:=rangefiles{ifsymlink,err:=os.Readlink(path

go - 关闭 chan 时出现死锁

我想了解为什么这种情况会陷入僵局,而另一种情况却不会。如果我在goroutine中关闭channel,它工作正常,但如果我在WaitGroup.Wait()之后关闭它会导致死锁。packagemainimport("fmt""io/ioutil""os""sync")var(wg=sync.WaitGroup{}links=make(chanstring))funcrec_readdir(depthint,pathstring){files,_:=ioutil.ReadDir(path)for_,f:=rangefiles{ifsymlink,err:=os.Readlink(path

livox MID360用livox ros driver2发布msg 并运行fast-lio2

之前用的livoxrosdriver不适配mid360和hap,在livox官方下载livoxsdk2和livoxrosdriver2进行mid360的测试。livoxsdk2与livoxrosdriver下载地址(2可与1共存与同一台电脑)https://github.com/Livox-SDK在安装后直接 roslaunch相关.launch文件时会报错Failedtoinitlivoxlidarsdk.需要更改livox_ros_driver2/config/MID360_config.json文件内参数(HAP就改HAP的)将cmd_data_ip改为192.168.1.50 就不会上

husky - commit-msg hook exited with code 1 (error)

git提交遇到husky-commit-msghookexitedwithcode1(error)的问题 解决方法:在冒号后加空格=》feat冒号空格或gitcommit-m"feat:xxxx",然后再pull、push即可。 

go - 不能将 type chan []string) 用作 type []chan string?

packagemainimport"fmt"funcx(foo[]string,czchanstring){fori:=rangefoo{cz现在什么都没有收到嗯...更新^...需要更多文字。...然后再多一点。好的,还有多少?我真的不敢相信。fdsafasfasfasdfdasfadfd 最佳答案 cannotusechannel.cSlice(typechan[]string)astype[]chanstringinargumenttoxcannotusechannel.cSlice(typechan[]string)asty

go - 不能将 type chan []string) 用作 type []chan string?

packagemainimport"fmt"funcx(foo[]string,czchanstring){fori:=rangefoo{cz现在什么都没有收到嗯...更新^...需要更多文字。...然后再多一点。好的,还有多少?我真的不敢相信。fdsafasfasfasdfdasfadfd 最佳答案 cannotusechannel.cSlice(typechan[]string)astype[]chanstringinargumenttoxcannotusechannel.cSlice(typechan[]string)asty

go - 试图了解 golang chan 导致崩溃或做其他事情

以下是来自https://golang.org/ref/mem的示例:varc=make(chanint)varastringfuncf(){a="hello,world"isalsoguaranteedtoprint"hello,world".Thewritetoahappensbeforethereceiveonc,whichhappensbeforethecorrespondingsendonccompletes,whichhappensbeforetheprint.Ifthechannelwerebuffered(e.g.,c=make(chanint,1))thenthepr

go - 试图了解 golang chan 导致崩溃或做其他事情

以下是来自https://golang.org/ref/mem的示例:varc=make(chanint)varastringfuncf(){a="hello,world"isalsoguaranteedtoprint"hello,world".Thewritetoahappensbeforethereceiveonc,whichhappensbeforethecorrespondingsendonccompletes,whichhappensbeforetheprint.Ifthechannelwerebuffered(e.g.,c=make(chanint,1))thenthepr

go - 将 csv.Reader() 用于 "chan string"的有效方法

我有一个“chanstring”,其中每个条目都是一个CSV日志行,我想将其转换为列“[]string”,目前我正在(效率低下)创建一个csv.NewReader(strings.NewReader(i))对于每个项目,看起来比实际需要做的工作多得多:fori:=rangefeederChan{r:=csv.NewReader(strings.NewReader(i))a,err:=r.Read()iferr!=nil{//logerror...continue}//thendostuffwith'a'//...}所以,如果有更有效的方法来做到这一点,我真的很感激分享,比如创建一次cs