v3.0.1我的同事在更新之前推送了一个标签go.mod以具有/v3后缀(https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher)。我已更新模块路径 ( go.mod) 和所有导入路径 ( *.go) 来修复它,标记为v3.0.2。
现在的问题是:
go get -v git.example.com/owner/repo@v3.0.2
go: finding git.example.com/owner/repo v3.0.2
go: git.example.com/owner/repo@v0.0.0-20190722053407-d85c4f69ad17: go.mod has post-v0 module path "git.example.com/owner/repo/v3" at revision
d85c4f69ad17
Run Code Online (Sandbox Code Playgroud)
发现这个:go build 不断抱怨:go.mod has post-v0 module path
因此,我删除了v3.0.0和v3.0.1标签,将其指向最新的提交,重新推送,但问题仍然存在。
我注意到go.mod仍然将旧版本称为间接依赖项:
require (
git.example.com/owner.repo v0.1.2 // indirect
Run Code Online (Sandbox Code Playgroud)
即使我改了它/v3 v3.0.2也会v0.1.12自动恢复。
为什么?
我错过了什么?
7 月 23 日星期二 05:54:56 +07 2019
rm go.*
go mod init …Run Code Online (Sandbox Code Playgroud) 我是Hibernate的新手.
我试图编写一个小程序来将数据插入到mysql数据库服务器中.
这是我的程序的源代码:
private int insertRelateNew(int newId, List<DocSimilar> relateNews) {
Session session = HibernateUtils.currentSession();
Transaction tx = session.beginTransaction();
RelatedArticles relatedArticles = null;
try {
relatedArticles = new RelatedArticles();
for (DocSimilar doc : relateNews) {
ApplicationPK appPK = new ApplicationPK(newId,
(int) doc.getDocid());
relatedArticles.setApplicationPK(appPK);
relatedArticles.setRelated_score(doc.getPercent());
session.save(relatedArticles);
tx.commit();
session.flush();
}
} catch (Exception e) {
e.printStackTrace();
tx.rollback();
}
return newId;
}
Run Code Online (Sandbox Code Playgroud)
运行时,它插入成功但有时它抛出一个TransactionException.
这是异常控制台:
org.hibernate.TransactionException: Transaction not successfully started
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:131)
at com.ant.crawler.dao.hibernate.SqlNewsPersistencer.insertRelateNew(SqlNewsPersistencer.java:56)
at com.ant.crawler.dao.hibernate.SqlNewsPersistencer.insertNews(SqlNewsPersistencer.java:40)
at com.ant.crawler.dao.hibernate.SqlPersistencer.store(SqlPersistencer.java:44)
at com.ant.crawler.core.AbstractCrawler.crawl(AbstractCrawler.java:186)
at com.ant.crawler.core.Worker.run(Worker.java:14)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at …Run Code Online (Sandbox Code Playgroud) Redis:2.0.4,2.4.1,......
我打算写一个Nagios插件来检查列表的长度.这是我的脚本:
#!/bin/sh
help()
{
echo "Usage: $0 <host> <port> <key> -w <warning> -c <critical>"
}
case "$1" in
--help)
help
exit
;;
esac
if [ $# -eq 0 ]; then
help
exit 3
fi
if [ $# -ne "7" ]; then
help
exit 4
fi
if [ $4 !="-w" -o $6 !="-c" ]; then
help
exit 5
fi
REDIS_CLI="/usr/local/redis/bin/redis-cli"
LLEN=`$REDIS_CLI -h $1 -p $2 llen $3 | awk '{ print $2 }'`
if [ $LLEN -lt $5 ]; then …Run Code Online (Sandbox Code Playgroud) puppet-server-2.7.19-1.el5 从puppetlabs repo安装.puppetmaster是成功启动,但它不会创建pid文件.这是[ FAILED ]停止时消息的原因:
/etc/init.d/puppetmaster stop
Stopping puppetmaster: [FAILED]
Run Code Online (Sandbox Code Playgroud)
init脚本:http://fpaste.org/nsfI/
该/etc/rc.d/init.d/functions库:http://fpaste.org/ox5Q/
这是我在调试模式下运行时得到的结果:http://fpaste.org/DkoS/
我知道去echo开始后手动PID到一个文件,但为什么不daemon发挥作用的--pidfile工作吗?
daemon $PUPPETMASTER $PUPPETMASTER_OPTS --masterport=${PUPPETMASTER_PORTS[$i]} --pidfile=/var/run/puppet/puppetmaster.${PUPPETMASTER_PORTS[$i]}.pid
当然,Puppet master正在以puppet用户身份运行:
ps -ef | grep [p]uppet
puppet 23418 1 0 18:13 ? 00:00:00 /usr/bin/ruby /usr/sbin/puppetmasterd
Run Code Online (Sandbox Code Playgroud)
和/var/run/puppet/文件夹的所有者是puppet:
# ls -ld /var/run/puppet/
drwxr-xr-x 2 puppet puppet 4096 Sep 17 18:46 /var/run/puppet/
Run Code Online (Sandbox Code Playgroud) 输入括号并回车后,下一行将有 8 个空格缩进:
print conn.generate_url(
seconds,
'GET',
Run Code Online (Sandbox Code Playgroud)
而不是 4:
print conn.generate_url(
seconds,
'GET',
Run Code Online (Sandbox Code Playgroud)
我的~/.vimrc:https : //github.com/quantonganh/salt-states/blob/master/vim/vimrc.jinja2
我错过了什么?
这是我的插件列表:
??? ctrlp.vim
??? gundo.vim
??? jedi-vim
??? nerdtree
??? powerline
??? salt-vim
??? supertab
??? syntastic
??? ultisnips
??? vim-fugitive
??? vim-indent-guides
??? vim-surround
??? vim-yankstack
??? vundle
Run Code Online (Sandbox Code Playgroud)
更新 2014 年 4 月 12 日星期六 10:00:55 ICT
我想知道:它是否遵循PEP8?
print conn.generate_url(
seconds,
'GET',
bucket,
key,
response_headers={
'response-content-type': 'application/octet-stream'
})
Run Code Online (Sandbox Code Playgroud)
连续行应该使用 Python 的隐式行在括号、方括号和大括号内连接,或使用悬挂缩进垂直对齐包裹的元素。使用悬挂缩进时,应考虑以下注意事项:第一行不应该有任何参数,并且应该使用进一步的缩进来清楚地将自己区分为续行。
在一个函数中,我们会有一些东西可以用连续线来区分,但这里只是一个print,应该是 4 个还是 8 …
我正在尝试将Upsource设置为在Traefik后面工作:https://www.jetbrains.com/help/upsource/proxy-configuration.html
traefik正在侦听端口8008和8443(因为80/443将用于另一个):
--entryPoints='Name:http Address::8008 Redirect.EntryPoint:https' --entryPoints='Name:https Address::8443 TLS'
Run Code Online (Sandbox Code Playgroud)
码头标签:
labels:
traefik.backend: upsource
traefik.enable: "true"
traefik.port: "8080"
traefik.frontend.rule: "Host:review.domain.com"
Run Code Online (Sandbox Code Playgroud)
在conf/internal/bundle.properties,base-url配置如下:
base-url=https\://review.domain.com\:8443/
Run Code Online (Sandbox Code Playgroud)
问题:
time="2017-09-20T03:23:59Z" level=error msg="Error getting ACME certificates [review.domain.com] : Cannot obtain certificates map[review.domain.com:acme: Error 400 - urn:acme:error:connection - Connection refused
Error Detail:
Validation for review.domain.com:443
Run Code Online (Sandbox Code Playgroud)
为什么它验证端口443而不是8443?
而且,要在Nginx中代理WebSockets:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://upsourcemachine.domain.local:1111;
proxy_pass_header Sec-Websocket-Extensions;
Run Code Online (Sandbox Code Playgroud)
你能确认Traefik支持WebSockets吗?如果是这样,如何配置?
Follow this guide, I'm trying to start minikube and forward port at the boot time.
My script:
#!/bin/bash
set -eux
export PATH=/usr/local/bin:$PATH
minikube status || minikube start
minikube ssh 'grep docker.for.mac.localhost /etc/hosts || echo -e "127.0.0.1\tdocker.for.mac.localhost" | sudo tee -a /etc/hosts'
minikube ssh 'test -f wait-for-it.sh || curl -O https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh'
minikube ssh 'chmod +x wait-for-it.sh && ./wait-for-it.sh 127.0.1.1:10250'
POD=$(kubectl get po --namespace kube-system | awk '/kube-registry-v0/ { print $1 }')
kubectl port-forward --namespace kube-system $POD 5000:5000
Run Code Online (Sandbox Code Playgroud)
Everything works fine except …