摘要: 一、将字符串转换为其他类型 str := "hello world" //将字符串转换为字符切片 强制类型转换 slice := []byte(str) fmt.Println(slice) fmt.Printf("%c\n", slice) //字符切片转换为字符串 强制类型转换 str2 := 阅读全文
posted @ 2020-03-28 10:10 RIP_KOBE 阅读(492) 评论(0) 推荐(0) 编辑
摘要: 1.flask安装 pip install flask 使用flask开发完成后,需要部署到生产环境,这时候就需要用到 nginx+uwsgi了 2.uwsgi安装 pip install uwsgi 3. 在项目根目录添加uwsgi.ini文件 uwsgi.ini配置文件编辑 [uwsgi] #h 阅读全文
posted @ 2020-03-27 18:44 RIP_KOBE 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 整理记录一下Go语言的字符串常用函数 都需要导入strings包 1.Contains func Contains(s, str) bool 功能:字符串s中是否包含str,返回bool值示例: //查找一个字符串在另一个字符串中是否出现,str1 := "hello world"str2 := " 阅读全文
posted @ 2020-03-27 09:19 RIP_KOBE 阅读(651) 评论(0) 推荐(1) 编辑
摘要: 1.1 Go是一门区分大小写的语言。 命名规则涉及变量、常量、全局函数、结构、接口、方法等的命名。 Go语言从语法层面进行了以下限定:任何需要对外暴露的名字必须以大写字母开头,不需要对外暴露的则应该以小写字母开头。 当命名(包括常量、变量、类型、函数名、结构字段等等)以一个大写字母开头,如:Anal 阅读全文
posted @ 2020-03-22 16:30 RIP_KOBE 阅读(724) 评论(0) 推荐(0) 编辑
摘要: list3 = [['1', '15', '8'], ['1', '14', '2'], ['1', '15', '9'], ['1', '14', '3'], ['1', '16', '0'], ['1', '15', '1'], ['1', '16', '2' 阅读全文
posted @ 2020-03-05 18:44 RIP_KOBE 阅读(10276) 评论(0) 推荐(1) 编辑
摘要: Started by user test java.lang.NoSuchMethodError: org.eclipse.jgit.lib.Repository.getRef(Ljava/lang/String;)Lorg/eclipse/jgit/lib/Ref; at jenkins.plug 阅读全文
posted @ 2020-03-02 12:00 RIP_KOBE 阅读(1980) 评论(0) 推荐(0) 编辑
摘要: 1.安装gunicorn,在你的生产环境安装: pip install gunicorn 2.安装supervisor yum install supervisor 或 pip installsupervisor 3.配置文件编辑 etc/supervisord.d/test.conf [progr 阅读全文
posted @ 2020-03-02 11:55 RIP_KOBE 阅读(788) 评论(0) 推荐(0) 编辑
摘要: 一、拉取镜像 在node1机器上拉取镜像 二、开始安装 curl https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml -o ku 阅读全文
posted @ 2020-02-10 09:45 RIP_KOBE 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 一、本文接着上文继续进行node1节点的添加 因为有许多和上次相同的步骤,故此处通过脚本来执行 #停止firewalld服务 systemctl stop firewalld && systemctl disable firewalld #关闭selinux sed -i 's/^SELINUX=e 阅读全文
posted @ 2020-02-09 16:24 RIP_KOBE 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 一、主机规划 角色名称 配置 域名 IP地址 master 2C8G/4G master.example.com 192.168.0.1 node1 2C4G/2G node1.example.com 192.168.0.2 node2 2C4G/2G node2.example.com 192.1 阅读全文
posted @ 2020-02-08 18:49 RIP_KOBE 阅读(215) 评论(0) 推荐(0) 编辑