Skip to content

翻了车的老司机

其实我一直在你身边

Search for:

goCategorySubscribe

vscode golang学习的好IDE

vscode golang学习的好IDE 安装 汉化 和 go插件安装

  • Posted on: 2020年10月30日 2020年10月30日
  • Author: zzs10086
  • Categories: go

GOLANG学习32. 命令行参数获取

flag.StringVar(&confPath, “c”, “”, “please input confPath”)
flag.IntVar(&logLevel, “d”, 10, “please input log level”)

  • Posted on: 2018年5月24日 2018年5月24日
  • Author: zzs10086
  • Categories: go

GOLANG学习31. 文件读取,一次性读取文件内容

str, err := ioutil.ReadFile(“C:/test.txt”)

  • Posted on: 2018年5月24日 2018年5月24日
  • Author: zzs10086
  • Categories: go

GOLANG学习30. 文件读取,逐行读取文件

把文件内容读到内存里,再逐行读取
reader := bufio.NewReader(file)
str, _, err := reader.ReadLine()

  • Posted on: 2018年5月24日 2018年5月24日
  • Author: zzs10086
  • Categories: go

GOLANG学习29. 反射获取字段、方法、调用

numOfMethod := val.NumMethod()
numOfFeild := val.NumField()

  • Posted on: 2018年5月23日 2018年5月23日
  • Author: zzs10086
  • Categories: go

GOLANG学习28. 反射

反射:可以在运行时冬天的获取变量的相关信息
类型 t := reflect.TypeOf(i)
值 v := reflect.ValueOf(i)
类别 k := v.Kind()

  • Posted on: 2018年5月23日 2018年5月23日
  • Author: zzs10086
  • Categories: go

GOLANG学习27. 接口定义

结构体struct 实现了接口的方法,就自动实现了接口的定义

  • Posted on: 2018年5月22日 2018年5月22日
  • Author: zzs10086
  • Categories: go

GOLANG学习26. 结构体继承

如果一个struct 嵌套了另一个匿名结构体,那么这个struct 可以直接访问这个匿名结构体里面的方法和字段,从而实现继承
如果一个struct 嵌套了另一个有名的结构体,那么这个模式就叫组合

  • Posted on: 2018年5月22日 2018年5月22日
  • Author: zzs10086
  • Categories: go

GOLANG学习25. 结构体方法

定义:func (recevier type) methodName(参数列表)(返回值列表){}

  • Posted on: 2018年5月22日 2018年5月22日
  • Author: zzs10086
  • Categories: go

GOLANG学习24. 定义链表

type Student struct {
Name string
Age int

Score float32
Next *Student
}
链表在内存里可以不是连续存储的,数组是连续存储的,链表包括单项链表,和双向链表,通过指针指向下一个或者上个结构体地址

  • Posted on: 2018年5月21日 2018年5月21日
  • Author: zzs10086
  • Categories: go

Pagination

Page: 1 Page: 2 Page: 3 Page: 4 Next page

分类目录

  • docker
  • elasticsearch
  • git
  • go
  • java
  • laravel
  • Linux
  • mysql
  • nginx
  • node.js
  • php
  • redis
  • shell
  • vue
  • webpack
  • 小程序
Search for:
2023年三月
一 二 三 四 五 六 日
« 5月    
 12345
6789101112
13141516171819
20212223242526
2728293031  

近期文章

  • 搭建 vite + vue项目
  • yarn 安装
  • laravel 打包压缩文件,批量文件打包压缩
  • laravel 拷贝扩展进 vendor 手动安装
  • 更改文件的所属组和用户,同时更改文件权限

近期评论

    © 2023 翻了车的老司机. 我在你身边绕了一个圈,回到原点你却已在远方。

    苏ICP备16035736号-3

    友情链接:一览网  江苏景威控股集团有限公司