Masterminds/sprig 是一个强大的golang 模版函数,以下是一个unrolled/render 集成Masterminds/sprig 的简单demo 环境准备 go.mod module github.com/rongfengliang/renameio-app ? go 1.1 ...
分类:
其他好文 时间:
2020-07-30 01:41:02
阅读次数:
102
sync.Cond 是一个事件通知,类似于java中的conditional 或者 wait/notify 机制。 它有一个重要的作用是,协程之间通过锁进行协调的时候,其中一个协程等待的时候,可以释放锁和资源,并且能够及时完成准备工作。 比如经典的生产者消费,例如有一个队列,只有大小为1,生产者需要 ...
分类:
编程语言 时间:
2020-07-30 01:33:46
阅读次数:
89
Go语言 Go语言自问世以来,以高效的开发效率和完美的运行速度,迅速风靡全球,被誉为21世纪的C语言。但是因为它的执行性能、并发性能、开发效率、编译迅速、强大的标准库、稳定性、代码简易等特色 Go语言是谷歌2009年发布的第二款开源编程语言,旨在针对多处理器系统应用程序的编程进行优化,使用Go语言编 ...
分类:
编程语言 时间:
2020-07-29 21:43:02
阅读次数:
71
最近在看go,遇到一个问题: 一时没看明白一元运算的异或运算是如何得到结果值的,代码如下: var b uint8 = 15 var c int8 = 15 fmt.Printf(" b: %08b \n", b) fmt.Printf("^b: %08b \n", ^b) fmt.Printf(" ...
分类:
其他好文 时间:
2020-07-29 15:16:00
阅读次数:
59
1 rop table t_UserProfile 2 go 3 CREATE TABLE [dbo].[t_UserProfile]( [FID] [int] IDENTITY(1,1) NOT NULL, [FUserID] [int] NOT NULL, [FCategory] [nvarch ...
分类:
其他好文 时间:
2020-07-29 14:56:56
阅读次数:
109
一、介绍go从v1.11之后就推出了新的包管理,gomodule,它和之前的$GOPATH不同,已经不在需要src,bin这样的子目录了,一个源代码目录甚至是空目录都可以作为module,只要其中包含有go.mod文件。module是一个相关Go包的集合,它是源代码更替和版本控制的单元。模块由源文件形成的go.mod文件的根目录定义,包含go.mod文件的目录也被称为模块根。moudles取代旧的
分类:
其他好文 时间:
2020-07-29 10:40:37
阅读次数:
114
import Vue from 'vue' import Router from 'vue-router' Router.prototype.go = function(t) { this.isBack = true console.log('go ' + this.history.current. ...
分类:
其他好文 时间:
2020-07-29 10:29:00
阅读次数:
83
<input type="button" value="Click" id="C" onclick="Go();"><input type="button" value="Wait" id="W" onclick="javascript:alert('Amazing!');"> <script>va ...
分类:
编程语言 时间:
2020-07-29 00:48:08
阅读次数:
125
e.subject.part.findLinksInto().each(function (node) { console.log(node.data); that.myDiagram.model.setDataProperty(node.data, "prevSeqId", 1); }); ...
分类:
Web程序 时间:
2020-07-28 22:07:16
阅读次数:
112
转至:http://www.178linux.com/87974 1、复制/etc/skel目录为/home/tuser1,要求/home/tuser1及其内部文件的属组和其它用户均没有任何访问权限 # cp -a /etc/skel /home/tuser1 # chmod -R go= /hom ...
分类:
其他好文 时间:
2020-07-28 14:17:18
阅读次数:
71