随笔分类 -  [04.01]-golang

够浪,哈哈哈
摘要:git clone --bare http://域名/分组/仓库名称.git cd 仓库名称.git git push --mirror http://新域名/新分组/新仓库名称.git -f 阅读全文
posted @ 2021-01-23 10:24 landv 阅读(246) 评论(0) 推荐(0) 编辑
摘要:266b9d49bfa3d2d16b4111378b1f9794373ee141 The Go Annotated Specification This document supersedes all previous Go spec attempts. The intentis to make t 阅读全文
posted @ 2021-01-23 09:45 landv 阅读(268) 评论(0) 推荐(0) 编辑
摘要:328df636c5f3e0875bc71a7eadf5a4a5084e0b13 The Go Annotated Specification This document supersedes all previous Go spec attempts. The intent isto make t 阅读全文
posted @ 2021-01-23 09:39 landv 阅读(171) 评论(0) 推荐(0) 编辑
摘要:18c5b488a3b2e218c0e0cf2a7d4820d9da93a554 20080303 https://github.com/landv/golang The Go Annotated Specification This document supersedes all previous 阅读全文
posted @ 2021-01-23 09:35 landv 阅读(185) 评论(0) 推荐(0) 编辑
摘要:[golang]golang 语法糖'...'三个点的用法 ‘...’三个点是golang的一种语法糖,表示为可变参数,可以接受任意个数的参数。 示例一: package main import "fmt" func Greeting(prefix string, who ...string) { 阅读全文
posted @ 2020-06-28 10:00 landv 阅读(540) 评论(0) 推荐(0) 编辑
摘要:[golang]golang EqualFold 字符串比较是否相等 EqualFold 源码 strings.EqualFold 是忽略大小写的比较,返回bool // EqualFold reports whether s and t, interpreted as UTF-8 strings, 阅读全文
posted @ 2020-06-28 09:37 landv 阅读(1857) 评论(0) 推荐(0) 编辑
摘要:[golang] golang文件读写 os.OpenFile(fileName,os.O_APPEND|os.O_WRONLY,os.ModeAppend) 读写文件要用到的OS包 func OpenFile(name string, flag int, perm FileMode) (*File 阅读全文
posted @ 2020-06-16 11:48 landv 阅读(10118) 评论(3) 推荐(1) 编辑
摘要:[golang]log日志 Logrus的使用 Logrus is a structured logger for Go (golang), completely API compatible with the standard library logger. Logrus is in mainte 阅读全文
posted @ 2020-06-16 11:10 landv 阅读(2489) 评论(0) 推荐(0) 编辑
摘要:Once 官方描述 Once is an object that will perform exactly one action,即 Once 是一个对象,它提供了保证某个动作只被执行一次功能,最典型的场景就是单例模式。 [Golang] 初探之 sync.Once sync.Once 是 Gola 阅读全文
posted @ 2020-06-16 10:26 landv 阅读(1108) 评论(0) 推荐(0) 编辑
摘要:[golang]golang signal.Notify 信号,如何优雅的退出 golang 中的signal 包的Notify函数 函数声明为 func Notify(c chan<- os.Signal, sig ...os.Signal) 官方描述: Notify函数让signal包将输入信号 阅读全文
posted @ 2020-06-16 09:05 landv 阅读(5348) 评论(0) 推荐(0) 编辑
摘要:源码和excel资料都在github:https://github.com/landv/golang-test/tree/master/lanproxy-go-client-regisServices 原本架构 能够访问互联网的机器,去访问: 2.2.2.2:8080,就是访问的mac电脑的80端口 阅读全文
posted @ 2020-05-27 09:13 landv 阅读(871) 评论(0) 推荐(0) 编辑
摘要:https://github.com/andlabs/libui c++ https://github.com/andlabs/ui https://github.com/gotk3/gotk3/ https://github.com/go-gl/gl/v2.1/gl https://github. 阅读全文
posted @ 2020-01-04 09:12 landv 阅读(431) 评论(0) 推荐(0) 编辑
摘要:简单粗暴仅需要三步即可 这里保持默认什么都不用添加,项目无需在 gopath里面 Vendoring mode无需开启。 go mod download 下载模块到本地缓存,缓存路径是 $GOPATH/pkg/mod/cache go mod vendor 把依赖拷贝到 vendor/ 目录下,这一 阅读全文
posted @ 2019-12-10 09:01 landv 阅读(1411) 评论(0) 推荐(0) 编辑
摘要:使用Hugo搭建静态站点 hugo下载地址:https://github.com/gohugoio/hugo 模板列表:https://github.com/gohugoio/hugoThemes 开始搭建 1、下载和初始化 安装包 源码编译 2、皮肤模板 我使用的皮肤 修改layouts/inde 阅读全文
posted @ 2019-11-29 17:20 landv 阅读(1866) 评论(0) 推荐(1) 编辑
摘要:dataDictionary 介绍 生成数据字典 应用场景 根据mysql数据库生成html格式数据字典,目前仅支持macos/linux/windows 使用步骤 windows: dataDictionary -c root:1234567890@tcp(127.0.0.1:3306)/ha66 阅读全文
posted @ 2019-11-27 15:33 landv 阅读(711) 评论(0) 推荐(0) 编辑
摘要:和老外的原文好像没多大联系了,哈哈哈,反正是读书笔记,下面的内容也是我读此书中的历程,也写进来吧。不过说实话,这框架的作者还挺对我脾气的,哈哈哈。 拒交“智商税”,解密“GUI”运行之道 我很忙 项目压力大,平时要加班,有些休闲时间,还要学习Qt。。。所以,可以提供的学习成本只剩下2小时了! 有归零 阅读全文
posted @ 2019-11-12 08:58 landv 阅读(310) 评论(0) 推荐(0) 编辑
摘要:与其说是go之旅,不如说是C,计算机世界的霸主C语言,有人可能说是汇编(ASM)才是,亲我说的是高级语言哈。不要抬杠,很多语言都是基于C的,搞了很多类C语言。 golang想绘制GUI,必然涉及交叉编译。 废话不多说,今天的主角是https://github.com/idea4good/GuiLit 阅读全文
posted @ 2019-11-12 08:51 landv 阅读(616) 评论(0) 推荐(0) 编辑
摘要:SSH-Fortress 1. What does it do? 2. build and run git clone https://github.com/mojocn/sshfortress.git && cd sshfortress; go build echo "run the app wi 阅读全文
posted @ 2019-10-24 08:29 landv 阅读(1503) 评论(0) 推荐(0) 编辑
摘要:Awesome Go financial support to Awesome Go A curated list of awesome Go frameworks, libraries and software. Inspired by awesome-python. Contributing P 阅读全文
posted @ 2019-10-22 17:02 landv 阅读(435) 评论(0) 推荐(0) 编辑
摘要:今天遇见一个很蛋疼的问题,不知道是不是我配置的问题,IDE直接run就报错。 问题描述 在开发代码过程中,经常会因为逻辑处理而对代码进行分类,放进不同的文件里面;像这样,同一个包下的两个文件,点击idea的运行按钮或者运行 go run main.go命令时,就会报错,如图所示。 那就好吧,我直接命 阅读全文
posted @ 2019-10-15 08:55 landv 阅读(19313) 评论(0) 推荐(2) 编辑