![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
GoLang
CsbLanca
这个作者很懒,什么都没留下…
展开
-
Go语言grpc通过protobuf实现远程调用官方Demo(examples)结构分析
#1.官方的Examples结构: helloworld目录结构 #1.1helloword.proto 文件内容 syntax = "proto3"; option java_multiple_files = true; option java_package = "io.grpc.examples.helloworld"; option java_outer_classname = "H...原创 2019-12-02 17:49:30 · 675 阅读 · 1 评论 -
Go语言实现文件的断点续传
如题: 注释在代码中 package main import ( "fmt" "io" "log" "os" "strconv" "strings" ) func main() { //C:\Users\Administrator\go\src\breakpoint\point.jpg //C:/Users/Administrator/Desktop/test.jpg //s...原创 2019-11-30 23:52:21 · 560 阅读 · 0 评论 -
Golang_GORM练习(一)
数据库 1.2.1数据库连接 1.2.2迁移 package main import ( "fmt" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" ) // 准备结构体 type Student struct { ID int Name string Age int Sex ...原创 2020-03-31 14:43:02 · 333 阅读 · 0 评论 -
Golang中import 导入包的几种方式:点,别名与下划线
在写Go代码的时候经常用到import这个命令用来导入包文件,看到的方式参考如下: import ( // 多个 "google.golang.org/grpc" "imcs/common/config" "imcs/common/orm" "imcs/entity/model" ) import( // 单个 "fmt" ) 然后在代码里面可以通过如下的方式调用 fmt.Pri...原创 2020-03-17 16:08:36 · 1058 阅读 · 0 评论