- 浏览: 2542820 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
2018 Golang Update(4)Dependency and Build
Install dep on Mac
>brew install dep
Check version
>dep version
dep:
version : v0.4.1
build date : 2018-01-27
git hash : 37d9ea0
go version : go1.9.3
go compiler : gc
platform : darwin/amd64
Go to the main.go directory
>cd /Users/carl/work/sillycat/monitor-water/restful_go_api/src/sillycat.com/restful_go_api
>dep init -v
It generate the Gopkg.lock and Gopkg.toml and a directory vendor/
Check the current status
>dep status
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
github.com/gin-contrib/sse branch master branch master 22d885f 22d885f 1
github.com/gin-gonic/gin ^1.2.0 v1.2 d459835 v1.2 3
github.com/go-sql-driver/mysql ^1.3.0 v1.3 a0583e0 v1.3 1
github.com/go-xorm/builder branch master branch master 4882244 4882244 1
github.com/go-xorm/core ^0.5.7 v0.5.7 da1adaf v0.5.7 1
github.com/go-xorm/xorm ^0.6.4 v0.6.4 1933dd6 v0.6.4 1
github.com/golang/protobuf v1.0.0 v1.0.0 9255415 v1.0.0 1
github.com/mattn/go-isatty v0.0.3 v0.0.3 0360b2a v0.0.3 1
github.com/ugorji/go v1.1 v1.1 9831f2c v1.1 1
golang.org/x/sys branch master branch master 37707fd 37707fd 1
gopkg.in/go-playground/validator.v8 v8.18.2 v8.18.2 5f1438d v8.18.2 1
gopkg.in/yaml.v2 branch v2 branch v2 d670f94 d670f94 1
If package is missing, it will tell us.
Download all the DEP
>dep ensure
Download the update the lock file and vendor directory
>dep ensure -update
Install Go on CentOS
>wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
Unzip and place in the working directory
>sudo ln -s ~/tool/go-1.10 /opt/go-1.10
>sudo ln -s /opt/go-1.10 /opt/go
GOROOT=/opt/go
GOPATH=/home/ec2-user/users/carl/monitor-water/restful_go_api
export GOROOT
export GOPATH
PATH=$PATH:/opt/go/bin
Who is doing this un professional things on our production server….
>type go
go is aliased to `git checkout'
>unalias go
>type go
go is /opt/go/bin/go
Check version
>go version
go version go1.10 linux/amd64
Install dep on the machine
>curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
It will install a dep in bin directory
>bin/dep version
dep:
version : devel
build date :
git hash :
go version : go1.10
go compiler : gc
platform : linux/amd64
Run the download command
>dep ensure
>dep ensure -update
Then the build will work
>go install sillycat.com/restful_go_api
RaspberryPi Installation
>wget https://dl.google.com/go/go1.10.linux-armv6l.tar.gz
Unzip and place that in working directory
Prepare the directory
>sudo ln -s /home/carl/work /opt/work
>mkdir /opt/work/go/bin
Add these in the PATH
PATH="/opt/go/bin:$PATH"
export GOROOT="/opt/go"
export GOPATH="/opt/work/go"
Check go version
>go version
go version go1.10 linux/arm
Try to install dep
>curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
Architecture armv7l is not supported by this installation script
In my working directory
>pwd
/opt/work/go
Try to get the source
>go get -u github.com/golang/dep/cmd/dep
Install that to bin directory
>go install github.com/golang/dep/cmd/dep
It is there after installation
>ls -l bin
total 11068
-rwxr-xr-x 1 carl carl 11411230 Feb 22 09:50 dep
Add to Path
PATH="/opt/work/go/bin:$PATH"
Check the version
>dep version
dep:
version : devel
build date :
git hash :
go version : go1.10
go compiler : gc
platform : linux/arm
Go to the directory of the project, main.go directory
>pwd
/home/carl/work/monitor-water/restful_go_api/src/sillycat.com/restful_go_api
Download all dependencies
>dep ensure
Build on raspberryPi
>go install sillycat.com/restful_go_api
References:
http://bazingafeng.com/2017/07/11/godep-for-managing-go-package-dependencies/
https://github.com/golang/dep
Install dep on Mac
>brew install dep
Check version
>dep version
dep:
version : v0.4.1
build date : 2018-01-27
git hash : 37d9ea0
go version : go1.9.3
go compiler : gc
platform : darwin/amd64
Go to the main.go directory
>cd /Users/carl/work/sillycat/monitor-water/restful_go_api/src/sillycat.com/restful_go_api
>dep init -v
It generate the Gopkg.lock and Gopkg.toml and a directory vendor/
Check the current status
>dep status
PROJECT CONSTRAINT VERSION REVISION LATEST PKGS USED
github.com/gin-contrib/sse branch master branch master 22d885f 22d885f 1
github.com/gin-gonic/gin ^1.2.0 v1.2 d459835 v1.2 3
github.com/go-sql-driver/mysql ^1.3.0 v1.3 a0583e0 v1.3 1
github.com/go-xorm/builder branch master branch master 4882244 4882244 1
github.com/go-xorm/core ^0.5.7 v0.5.7 da1adaf v0.5.7 1
github.com/go-xorm/xorm ^0.6.4 v0.6.4 1933dd6 v0.6.4 1
github.com/golang/protobuf v1.0.0 v1.0.0 9255415 v1.0.0 1
github.com/mattn/go-isatty v0.0.3 v0.0.3 0360b2a v0.0.3 1
github.com/ugorji/go v1.1 v1.1 9831f2c v1.1 1
golang.org/x/sys branch master branch master 37707fd 37707fd 1
gopkg.in/go-playground/validator.v8 v8.18.2 v8.18.2 5f1438d v8.18.2 1
gopkg.in/yaml.v2 branch v2 branch v2 d670f94 d670f94 1
If package is missing, it will tell us.
Download all the DEP
>dep ensure
Download the update the lock file and vendor directory
>dep ensure -update
Install Go on CentOS
>wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
Unzip and place in the working directory
>sudo ln -s ~/tool/go-1.10 /opt/go-1.10
>sudo ln -s /opt/go-1.10 /opt/go
GOROOT=/opt/go
GOPATH=/home/ec2-user/users/carl/monitor-water/restful_go_api
export GOROOT
export GOPATH
PATH=$PATH:/opt/go/bin
Who is doing this un professional things on our production server….
>type go
go is aliased to `git checkout'
>unalias go
>type go
go is /opt/go/bin/go
Check version
>go version
go version go1.10 linux/amd64
Install dep on the machine
>curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
It will install a dep in bin directory
>bin/dep version
dep:
version : devel
build date :
git hash :
go version : go1.10
go compiler : gc
platform : linux/amd64
Run the download command
>dep ensure
>dep ensure -update
Then the build will work
>go install sillycat.com/restful_go_api
RaspberryPi Installation
>wget https://dl.google.com/go/go1.10.linux-armv6l.tar.gz
Unzip and place that in working directory
Prepare the directory
>sudo ln -s /home/carl/work /opt/work
>mkdir /opt/work/go/bin
Add these in the PATH
PATH="/opt/go/bin:$PATH"
export GOROOT="/opt/go"
export GOPATH="/opt/work/go"
Check go version
>go version
go version go1.10 linux/arm
Try to install dep
>curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
Architecture armv7l is not supported by this installation script
In my working directory
>pwd
/opt/work/go
Try to get the source
>go get -u github.com/golang/dep/cmd/dep
Install that to bin directory
>go install github.com/golang/dep/cmd/dep
It is there after installation
>ls -l bin
total 11068
-rwxr-xr-x 1 carl carl 11411230 Feb 22 09:50 dep
Add to Path
PATH="/opt/work/go/bin:$PATH"
Check the version
>dep version
dep:
version : devel
build date :
git hash :
go version : go1.10
go compiler : gc
platform : linux/arm
Go to the directory of the project, main.go directory
>pwd
/home/carl/work/monitor-water/restful_go_api/src/sillycat.com/restful_go_api
Download all dependencies
>dep ensure
Build on raspberryPi
>go install sillycat.com/restful_go_api
References:
http://bazingafeng.com/2017/07/11/godep-for-managing-go-package-dependencies/
https://github.com/golang/dep
发表评论
-
Stop Update Here
2020-04-28 09:00 310I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 468NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 362Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 364Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 330Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 424Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 367Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 445VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 377Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 468NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 414Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 332Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 243GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 445GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 321GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 307Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 286Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 303Serverless with NodeJS and Tenc ...
相关推荐
`update-golang` 是一个专为Golang爱好者和开发者设计的实用脚本工具,它的主要目的是简化Go语言的更新过程,使得用户能够便捷地获取并安装最新的Golang版本,同时尽可能减少对系统的侵入性。这个工具对于那些频繁...
国密加密解密 sm4 sm2 的java python golang实现,java和python,golang的有一定区别,需要修改点东西才可以实现。 SM4Key = ran_str = ''.join(random.sample(string.ascii_letters + string.digits, 16)) ...
《Learn Data Structures and Algorithms with Golang》是一本专注于使用Golang语言学习数据结构和算法的电子书,旨在帮助读者深入理解这两个编程领域的核心概念。Golang,也被称为Go语言,是由Google开发的一种静态...
update-golang update-golang是一个脚本,可以轻松地获取和安装新的Golang版本,并减少系统入侵。 目录工作原理用法警告删除示例定制逐个更新update-golang update-golang是一个脚本,可轻松获取和安装新的Golang...
在`pycharm2018.3之golang插件`这个主题中,我们将探讨如何在PyCharm 2018.3版本上安装和配置Golang插件,以便在这款强大的Python IDE中编写和调试Go代码。 首先,我们需要了解为什么在PyCharm 2018.3这个特定版本...
然而,通过使用`update-golang`脚本,我们可以简化这一过程,实现快速、高效地获取并安装新的Golang版本。`update-golang`是一个专为Linux开发环境设计的实用工具,它使得Go语言版本的管理和更新变得轻而易举。 ...
介绍通过GO语言进行网页编程方法GitHub上的源代码及MD文件压缩文件。阅读MD文件你可能需要MD阅读器cutemarked V0.11.2 http://download.csdn.net/detail/sdhongjun/9454039
4. **golang.org/x/sys**:系统调用和操作系统的特定功能接口,如 Unix 系统的系统调用、Windows API 等。 5. **golang.org/x/image**:图像处理库,支持多种图像格式,如 PNG、JPEG、BMP 等,以及图像操作函数。 ...
Cloud Native programming with Golang: Develop microservice-based high performance web apps for the cloud with Go Discover practical techniques to build cloud-native apps that are scalable, reliable, ...
谢大大编写了build-web-application-with-golang ,托管在github上,只有md版的,我个人把它编译成了chm版,共享给大家,又名《Go语言Web编程》,希望各位喜欢
标题中的"Pycharm Golang插件 jar"指的是在PyCharm这款流行的Python集成开发环境中安装Golang编程语言的扩展插件。PyCharm是由JetBrains公司开发的一款强大的IDE,它支持多种编程语言,包括Python、Go等。由于Golang...
golang-docker-build:用于golang微服务的Docker构建
4. **gRPC客户端**:学习如何在Golang中编写客户端代码,调用远程服务并处理响应。 5. **流式RPC**:探讨gRPC的双向流和单向流特性,理解它们在实时数据传输和长连接场景中的应用。 6. **安全与认证**:学习如何在...
golang 实现海康相机抓拍,目前只支持球机。... 如何调试?用vscode打开,安装golang插件,即可直接调试运行。...编译与运行:运行go build命令,将HKnet.exe拷贝到build\Windows下,运行此exe,在D盘下可看到抓拍图片。
开源项目-udhos-update-golang.zip,update-golang is a script to easily fetch and install new Golang releases
golang安装包下载
weixin-golang-sdk 微信golang工具包
后端服务把json日志保存到文件 ...golang服务 从kafka接收日志数据 经过日志格式的清洗与转化后 保存到clickhouse数据库 供检索分析使用 这是一个完整的日志收集循环 适合一个小型分布式或单体服务使用