实习第一周(Golang),web前端开发就业情况

以及多态,文件操作,以及JSON序列化反序列化,单元测试,进程,线程,反射,管道,socket编程,redis,等有了初步了解,是不是现在就成功了,肿么可能,我要立马上线,去拿项目读源码学习,于是开始了我的配置环境阶段

三,环境安装


我安装的是最新的go版本1.14,下载的是go1.14.windows-amd64.msi 安装文件。文件需要到https://golang.org/ 去下载。由于众所周知的原因,需要翻墙,否则网站打不开。

image-20200810124757635

安装很顺利。安装完后打开一个cmd窗口,输入:

E:\goproject>go version

go version go1.14.6 windows/amd64

说明已经安装成功。

四,项目操练


想着到github上找一个go语言编写的项目弄到本地查看编译下。找到一个beebeego在如何获取地方看到:

go get github.com/astaxie/beego

这是要在cmd 窗口直接输入这行命令就能获取。我于是试了下。可是,输入命令后看着是在运行,但是运行结束后,报以下提示信息,

原来是代理的问题,

unrecognized import path “golang.org/x/text/transform”: https fetch: Get “https://golang.org/x/text/transform?go-get=1”:

dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond

after a period of time, or established connection failed because connected host has failed to respond.

unrecognized import path “golang.org/x/text/unicode/norm”: https fetch: Get "https://golang.org/x/text/unicode/norm?go-g

et=1": dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly re

spond after a period of time, or established connection failed because connected host has failed to respond.

cd .; git clone – https://github.com/gadelkareem/delve C:\Users\luckly\go\src\github.com\gadelkareem\delve

Cloning into ‘C:\Users\luckly\go\src\github.com\gadelkareem\delve’…

error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

fatal: the remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

package github.com/gadelkareem/delve/pkg/terminal: exit status 128

package github.com/gadelkareem/delve/service: cannot find package “github.com/gadelkareem/delve/service” in any of:

F:\sofaware\GO\src\github.com\gadelkareem\delve\service (from $GOROOT)

C:\Users\luckly\go\src\github.com\gadelkareem\delve\service (from $GOPATH)

package github.com/gadelkareem/delve/service/debugger: cannot find package “github.com/gadelkareem/delve/service/debugger” in any of:

F:\sofaware\GO\src\github.com\gadelkareem\delve\service\debugger (from $GOROOT)

C:\Users\luckly\go\src\github.com\gadelkareem\delve\service\debugger (from $GOPATH)

package github.com/gadelkareem/delve/service/rpc2: cannot find package “github.com/gadelkareem/delve/service/rpc2” in any of:

F:\sofaware\GO\src\github.com\gadelkareem\delve\service\rpc2 (from $GOROOT)

C:\Users\luckly\go\src\github.com\gadelkareem\delve\service\rpc2 (from $GOPATH)

package github.com/gadelkareem/delve/service/rpccommon: cannot find package “github.com/gadelkareem/delve/service/rpccommon” in any of:

F:\sofaware\GO\src\github.com\gadelkareem\delve\service\rpccommon (from $GOROOT)

C:\Users\luckly\go\src\github.com\gadelkareem\delve\service\rpccommon (from $GOPATH)

cd C:\Users\luckly\go\src\github.com\astaxie\beego; git pull --ff-only

fatal: not a git repository (or any parent up to mount point /cygdrive)

Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

package github.com/astaxie/beego/swagger: exit status 128

package github.com/astaxie/beego/utils: cannot find package “github.com/astaxie/beego/utils” in any of:

F:\sofaware\GO\src\github.com\astaxie\beego\utils (from $GOROOT)

C:\Users\luckly\go\src\github.com\astaxie\beego\utils (from $GOPATH)

image-20200810125234917

于是我发挥了爱学习,爱搜索,爱询问的能力,了解到了有代理这回事,使用go.mod来进行包管理

GO111MODULE

GO111MODULE有三个值:off, onauto(默认值)

  • GO111MODULE=off,go命令行将不会支持module功能,寻找依赖包的方式将会沿用旧版本那种通过vendor目录或者GOPATH模式来查找。

  • GO111MODULE=on,go命令行会使用modules,而一点也不会去GOPATH目录下查找。

GO111MODULE=auto

,默认值,go命令行将会根据当前目录来决定是否启用module功能。这种情况下可以分为两种情形:

  • 当前目录在GOPATH/src之外且该目录包含go.mod文件

  • 当前文件在包含go.mod文件的目录下面。

那么我们就来设置吧,我打开命令行:

C:\Users\luckly>go env -w GO111MODULE=on

C:\Users\luckly>go env -w GOPROXY=https://goproxy.io,direct

并进行了简单测试,新建一个名为 main.go的项目,项目路径 e:\goproject (注意,该路径并不在GOPATH里)

image-20200810131549241

当我再次打开命令行的时候

C:\Users\luckly>go get github.com/beego/bee

go: downloading github.com/beego/bee v1.12.0

go: github.com/beego/bee upgrade => v1.12.0

go: downloading github.com/gorilla/websocket v1.4.2

go: downloading github.com/astaxie/beego v1.12.1

go: downloading github.com/lib/pq v1.7.0

go: downloading github.com/go-sql-driver/mysql v1.5.0

go: downloading github.com/gadelkareem/delve v1.4.2-0.20200619175259-dcd0133

go: downloading github.com/smartwalle/pongo2render v1.0.1

go: downloading gopkg.in/yaml.v2 v2.3.0

go: downloading github.com/pelletier/go-toml v1.2.0

go: downloading github.com/davecgh/go-spew v1.1.1

go: downloading github.com/fsnotify/fsnotify v1.4.9

go: downloading github.com/flosch/pongo2 v0.0.0-20200529170236-5abacdfa4915

go: downloading golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9

go: downloading github.com/spf13/viper v1.7.0

go: downloading github.com/hashicorp/hcl v1.0.0

go: downloading github.com/spf13/pflag v1.0.3

go: downloading github.com/mitchellh/mapstructure v1.1.2

go: downloading github.com/spf13/jwalterweatherman v1.0.0

go: downloading gopkg.in/ini.v1 v1.51.0

go: downloading github.com/spf13/cast v1.3.0

go: downloading github.com/magiconair/properties v1.8.1

go: downloading github.com/subosito/gotenv v1.2.0

go: downloading github.com/spf13/afero v1.1.2

go: downloading golang.org/x/text v0.3.2

go: downloading github.com/sirupsen/logrus v1.6.0

go: downloading github.com/mattn/go-colorable v0.0.9

go: downloading github.com/cosiner/argv v0.1.0

go: downloading github.com/mattn/go-isatty v0.0.3

go: downloading golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4

go: downloading github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b

go: downloading github.com/hashicorp/golang-lru v0.5.4

go: downloading go.starlark.net v0.0.0-20190702223751-32f345186213

go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.3

竟然成功了,

于是我又紧追其后,在命令行输入了

C:\Users\luckly>bee

Bee is a Fast and Flexible tool for managing your Beego Web Application.

USAGE

bee command [arguments]

AVAILABLE COMMANDS

version Prints the current Bee version

migrate Runs database migrations

api Creates a Beego API application

bale Transforms non-Go files to Go source files

fix Fixes your application by making it compatible with newer versions of Beego

pro Source code generator

dlv Start a debugging session using Delve

dockerize Generates a Dockerfile for your Beego application

generate Source code generator

hprose Creates an RPC application based on Hprose and Beego frameworks

new Creates a Beego application

pack Compresses a Beego application into a single file

rs Run customized scripts

run Run the application by starting a local development server

server serving static content over HTTP on port

Use bee help [command] for more information about a command.

ADDITIONAL HELP TOPICS

Use bee help [topic] for more information about that topic.

又成功了,至次就成功了吗?没有,为啥?

bee下载到那儿了,不知道,罪过罪过,在我的go语言安装目录的,src ,pkg等下面都没找到,这难道没安上?还是哪里有问题。各种查找。最后终于找到一个解决办法。需要自己创建一个工作区目录。为什么不使用安装目录,是因为要保证安装目录的纯洁性。

自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。

深知大多数前端工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则几千的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年Web前端开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。

img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上前端开发知识点,真正体系化!

由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:前端)

最后

本人分享一下这次字节跳动、美团、头条等大厂的面试真题涉及到的知识点,以及我个人的学习方法、学习路线等,当然也整理了一些学习文档资料出来是附赠给大家的。知识点涉及比较全面,包括但不限于前端基础,HTML,CSS,JavaScript,Vue,ES6,HTTP,浏览器,算法等等

详细大厂面试题答案、学习笔记、学习视频等资料领取,点击资料领取直通车免费领取!

前端视频资料:
更新!**

如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:前端)

最后

本人分享一下这次字节跳动、美团、头条等大厂的面试真题涉及到的知识点,以及我个人的学习方法、学习路线等,当然也整理了一些学习文档资料出来是附赠给大家的。知识点涉及比较全面,包括但不限于前端基础,HTML,CSS,JavaScript,Vue,ES6,HTTP,浏览器,算法等等

详细大厂面试题答案、学习笔记、学习视频等资料领取,点击资料领取直通车免费领取!

[外链图片转存中…(img-bvqMpKh1-1712335900120)]

前端视频资料:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值