草庐IT

work-func

全部标签

On branch masternothing to commit, working tree clean

错误问题: 解决方案:1.把需要上传的文件拖放到git生成的文件夹里即可 2.gitadd.   gitcommit-m"第二次提交"    

json - 为什么在接口(interface)中添加 func 会导致 json.Unmarshal 失败?

为什么会失败并出现错误:json:cannotunmarshalobjectintoGostructfieldPerson.spouseoftypemain.SpousetypeSpouseinterface{Name()//Addingthiscausesanerror}typeAddressinterface{}typePersonstruct{Namestring`json:"name"`A*Address`json:"address"`S*Spouse`json:"spouse"`}funcmain(){b:=[]byte(`{"name":"sarah","address":

json - 为什么在接口(interface)中添加 func 会导致 json.Unmarshal 失败?

为什么会失败并出现错误:json:cannotunmarshalobjectintoGostructfieldPerson.spouseoftypemain.SpousetypeSpouseinterface{Name()//Addingthiscausesanerror}typeAddressinterface{}typePersonstruct{Namestring`json:"name"`A*Address`json:"address"`S*Spouse`json:"spouse"`}funcmain(){b:=[]byte(`{"name":"sarah","address":

LibreSSL SSL_read: error:02FFF03C:system library:func(4095):Operation timed out, errno 60

如图修复方式修改hosts命令行vim/etc/hosts使用该链接查看github的IPhttps://github.com.ipaddress.com/www.github.com然后将该IP添加到hosts文件中

对文件权限误操作导致的sudo报错Sudo doesn‘t work: “/etc/sudoers is owned by uid 1000, should be 0”的问题

     系统是Ubuntu20.04,使用VsCode在局域网ssh登陆主机。为了给ssh登陆主机的vscode提供写入权限,试图用这个命令给vscode整个etc文件夹的读取权限sudochown-R$USER/etc然后sudo就没有办法使用了只有一个用户,没有超级管理员,没有sudo没有办法修改权限的配置文件。试图将权限改回全部用户的时候因为没有sudo所以不能继续。。。进入了死循环chown-Rroot/etc但是参考这个操作,可以代替当前用户直接的sudo命令https://iqcode.com/code/shell/sudo-etcsudoers-is-owned-by-uid-

【Git】error: The following untracked working tree files would be overwritten by checkout

【Git】error:Thefollowinguntrackedworkingtreefileswouldbeoverwrittenbycheckout现象描述解决过程现象描述(注意数据备份)一个项目由submodule方式组成了一个主仓库,当在主仓库中修改了多个submodule的version,同时也修改了一些非submodule的文件内容。在gitadd,gitcommit,gitpush都成功后,想切换到某个branch(A)的时候,报出错误error:Thefollowinguntrackedworkingtreefileswouldbeoverwrittenbycheckout。但

go - 获取/文章/:article_id Not working Gin-Gonic/Gin

我正在使用API,GET和POST工作正常,除非我尝试通过其ID获取选择记录(例如/articles/2)。文章存在,当通过/articles路径检索所有记录时,我得到了正确的响应。这是堆栈跟踪。$gorunmain.go[GIN-debug][WARNING]Runningin"debug"mode.Switchto"release"modeinproduction.-usingenv:exportGIN_MODE=release-usingcode:gin.SetMode(gin.ReleaseMode)[GIN-debug]GET/-->main.index(3handlers)

go - 获取/文章/:article_id Not working Gin-Gonic/Gin

我正在使用API,GET和POST工作正常,除非我尝试通过其ID获取选择记录(例如/articles/2)。文章存在,当通过/articles路径检索所有记录时,我得到了正确的响应。这是堆栈跟踪。$gorunmain.go[GIN-debug][WARNING]Runningin"debug"mode.Switchto"release"modeinproduction.-usingenv:exportGIN_MODE=release-usingcode:gin.SetMode(gin.ReleaseMode)[GIN-debug]GET/-->main.index(3handlers)

git commit 出现On branch master nothing to commit, working tree clean解决方法

gitcommit返回的是Onbranchmasternothingtocommit,workingtreeclean,通过gitstatus查看是否提交返回的也是Onbranchmasternothingtocommit,workingtreeclean,但在idea的git管理上可以发现确实是提交了的:因为在idea上显示已提交,所以就尝试直接push,报错: 查看报错信息,提示需要先gitpull然后再push,gitpull后报错: 改用gitpulloriginmaster,报错: 之前遇到过这个报错,改用 gitpulloriginmaster--allow-unrelated-h