开发小白——项目开发的文件夹管理模式
Controler前后端分离一般用api,下面可以分v1,v2的子目录作为版本
Config管理网站的配置参数
model数据库的存储读写
middleware中间件,前后端分离用配置跨域中间件
routes作为路由的接口
utils公共工具的包放在这里面
upload管理上传下载静态资源
web存放前端页面
自学Go---和C++的不同之处
前言经由学长引荐,得到了可以学习Go的机会。Go是未来的一门趋势,有望取代目前互联网Java的地位。后端开发需学本人主要在菜鸟教程上进行学习
Go语言数据类型数据类型指定有效的Go变量可以保存的数据类型。在Go语言中,类型分为以下四类:
1、基本类型:数字,字符串和布尔值属于此类别。
2、聚合类型:数组和结构属于此类别。
3、引用类型:指针,切片,map集合,函数和Channel属于此类别。
4、接口类型
基本类型在Go语言中,数字分为三个子类别:整数,浮点数,布尔类型
整数在Go语言中,有符号和无符号整数都可以使用四种不同的大小,如下表所示。有符号的int由int表示,而无符号的整数由uint表示。数据类型 描述int8 8位有符号整数int16 16位有符号整数int32 32位有符号整数int64 64位有符号整数uint8 8位无符号整数uint16 16位无符号整数uint32 32位无符号整数uint64 64位无符号整数int in和uint都包含相同的大小,无论是32位还是64位。uint in和uint都包含相同的大小,无论是32位还是64位。rune 它是i ...
解决vscode报错gopls was not able to find modules in your workspace.
没有go.mod文件原因是当前目录没有go.mod文件,因此vscode会出现如下报错
123456gopls was not able to find modules in your workspace.When outside of GOPATH, gopls needs to know which modulesyou are working on.You can fix this by opening your workspaceto a folder inside a Go module, or by using a go.work fileto specify multiple m
执行命令行($ go mod init packagestudy)即可在文件同级目录下初始化一个新的Go模块,会自动创建一个(go.mod)文件
自学Java---和C++的不同之处
前言目前来看,中国的互联网开发岗位,依旧是以Java为主。网上的Java教程已经许多,视频或者网页等形式,其中不乏许多优质教程。
视频课教程大家都比较推荐韩顺平老师的课程,而网站在线学习我选择的是菜鸟教程目前的学习方式是在网站在线学习,为什么不看视频课,有以下原因:(1)自己已经学习过c,c++,Python等语言,并不是0基础,目前视频教程多对0基础十分友好,但对于有一定编程基础的学习者来说,重复学习内容较多,视频的效率比较低下(2)网站在线学习教程提供了很好的实例程序以及在线编译器,方便学习。
C++是自己所学的第一门面向对象语言,也是学校培养方案里唯一一门必修面向对象,自然是现阶段最熟悉的面向对象语言。Java同样也是面向对象语言,在学习的过程中与C++对比,总结一些不同之处,也有助于自己的学习记忆巩固。
Java基本数据类型与C++不同的是,Java新增了数据类型byte。 byte 数据类型是8位、有符号的,以二进制补码表示的整数; 最小值是 -128(-2^7); 最大值是 127(2^7-1); 默认值是 0; byte 类型用在大型数组中节 ...
Hello World
大家好,这是我的第一篇个人博客,现在只是测试,虽然是说大家好,但是根本就没有人看,所以不久之后也会被我删掉233
一级标题二级标题三级标题四级标题五级标题六级标题代码块1234567//欧几里得算法求最大公约数int gcd(int a,int b){ if(a%b==0) return b; else return gcd(b,a%b);}
字体展示强调
斜体
删除线
print(Hello,World!)
更新博客三步hexo clean 清除hexo g增生文件hexo d上传到github
引用
列表一
列表二
这是一个链接