GO 项目部署

安装GO 环境

官方下载地址

源码COPY

IOA虚拟工厂功能介绍

把源码COPY到go/src/目录下

  • windows 在 c:/users/administrator/go/src
  • mac 在 users/go/src
  • 环境变量设置
#GOPATH
export GOPATH=~/Go
#GOROOT
export GOROOT=~/go
#PATH
export PATH=$GOROOT/bin:$GOPATH```

# 安装依赖包
> 这个命令可以安装 大多数的包,但是并不能安装完整,部分包需要手动通过GIT下载

go get -d -v ./…

```dos
git clone https://github.com/golang/net
git clone https://github.com/golang/text.git text

下载LiteIde

下载地址

  • 下载完后编辑 并不能成功还需要下载部分的依赖包
  • 交叉编辑包下载 windows 下载mingw
    包下载

交叉编辑的方法
下载地址https://studygolang.com/dl

1,新建C:\GoDev目录,后面的安装都在这个目录下,当然不建也可以。
2,安装LiteIDE。下载liteidex28.windows-qt4.zip,解压为C:\GoDev\liteide目录。
3,安装GO win32。下载go1.6.windows-386.zip,解压为C:\GoDev\go目录。
4,合并GO linux64。下载go1.6.linux-amd64.tar.gz,解压后,把其中\go\pkg目录下的内容,除了include,其余全部拷贝到C:\GoDev\go\pkg目录下,覆盖(其实没有覆盖,下层目录名不同)。如果还想编译其他版本,也可以类似合并。
5,运行LiteIDE,工具栏选择win32,后面的编辑当前环境按钮,打开win32.env,修改下面这行并保存:
GOROOT=C:\GoDev\go
6,工具栏选择cross-linux64,编辑打开cross-linux64.env,修改下面这行并保存:
GOROOT=C:\GoDev\go

在windows 平台按以上操作其实就是把PKG下边多放一个可编译使用的包
在mac 平台下载WINDOWS包 找到位置放进去即可,不过试了好像编辑不成功待继续摸索

#vs code 支持GO

插件安装等和其他的一样不用说,这里只多了一些包的下载,自动下载会报错
GIT地址

  • installing github.com/mdempsky/gocode
    git clone https://github.com/mdempsky/gocode.git
  • installing github.com/uudashr/cmd/gopkgs
    git clone https://github.com/uudashr/gopkgs.git
  • installing github.com/ramya-rao-a/go-outline
    git clone https://github.com/ramya-rao-a/go-outline.git
  • installing github.com/acroca/go-symbols
    git clone https://github.com/acroca/go-symbols.git
  • installing golang.org/x/tools/cmd/guru
    git clone https://github.com/golang/tools.git
  • installing golang.org/x/tools/cmd/gorename
    git clone https://github.com/golang/tools.git
  • installing github.com/cweill/gotests/…
    git clone https://github.com/cweill/gotests.git
  • installing github.com/fatih/gomodifytags
    git clone https://github.com/fatih/gomodifytags.git
  • installing github.com/josharian/impl
    git clone https://github.com/josharian/impl.git
  • installing github.com/davidrjenni/reftools/cmd/fillstruct
    git clone https://github.com/davidrjenni/reftools.git
  • installing github.com/haya14busa/goplay/cmd/goplay
    git clone https://github.com/haya14busa/goplay.git
  • installing github.com/godoctor/godoctor
    git clone https://github.com/godoctor/godoctor.git
  • installing github.com/go-delve/delve/cmd/dlv
    git clone https://github.com/go-delve/delve.git
  • installing github.com/stamblerre/gocode
    git clone https://github.com/stamblerre/gocode.git
  • installing github.com/rogpeppe/godef
    git clone https://github.com/rogpeppe/godef.git
  • installing github.com/sqs/goreturns
    git clone https://github.com/sqs/goreturns.git
  • installing golang.org/x/lint/golint
    git clone https://github.com/golang/lint.git

sys
git clone https://github.com/golang/sys.git

mysql

8.0 添加用户

先创建一个用户

create user 'tone'@'%' identified by '123123';

再进行授权,必须有远程用户视图才有用

grant all privileges on *.* to 'root'@'%' with grant option;

用户刷新,才会有效果

flush privileges;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值