GoLand IDE 如何设置每次打开时先展示启动界面
摘要:#GoLand IDE 如何设置每次打开时先展示启动界面 打开设置,在SystemSeting下进行如下操作即可
阅读全文
posted @
2023-02-17 17:06
OwlInTheOaktree
阅读(396)
推荐(0) 编辑
Go语言基础07 _interface _1
摘要:Go语言基础07 _interface _1 与其他主要编程语⾔的差异 接⼝为⾮⼊侵性,实现不依赖于借⼝定义 所以接⼝的定义可以包含在接⼝使⽤者包内 package interface_test import "testing" // 接⼝定义 type Programmer interface {
阅读全文
posted @
2021-09-13 17:50
OwlInTheOaktree
阅读(26)
推荐(0) 编辑
Go语言基础06 _function
摘要:Go语言基础06 _function 函数在Go语言中是一等公民 与其他主要编程语言的差别 可以有多个返回值 所有参数都是值传递:slice,map,channel 会有传引用的 错觉 函数可以作为变量的值 函数可以作为参数和返回值 defer 函数时 Go语言中类似于 java的 final一样的
阅读全文
posted @
2021-09-13 17:13
OwlInTheOaktree
阅读(24)
推荐(0) 编辑
Go语言基础05 _string
摘要:Go语言基础05 _string 1、基本使用 package string import "testing" func TestString(t *testing.T) { var s string t.Log(s) s = "Hello" t.Log(len(s)) t.Log(s[1]) //
阅读全文
posted @
2021-09-13 17:12
OwlInTheOaktree
阅读(27)
推荐(0) 编辑
Go语言学习 _基础04 _Map&Set
摘要:Go语言学习 _基础04 _Map&Set 1、map package map_test import ( "fmt" "testing" ) func TestInitMap(t *testing.T) { m1 := map[int]int{1: 1, 2: 4, 3: 9} // 初始化方式一
阅读全文
posted @
2021-08-31 13:07
OwlInTheOaktree
阅读(49)
推荐(0) 编辑
Go语言学习 _基础03 _数组和切片
摘要:Go语言学习 _基础03 _数组和切片 1、数组 package array_test import "testing" func TestArrayInit(t *testing.T){ var arr [3]int // 声明方式 1 arr1 := [4]int{1,2,3,4} // 声明方
阅读全文
posted @
2021-08-31 00:31
OwlInTheOaktree
阅读(30)
推荐(0) 编辑
Go语言学习 _基础02 _条件表达式、分支、循环
摘要:Go语言学习 _基础02 _条件表达式、分支、循环 条件表达式和switch package condition import "testing" func TestCondiction(t *testing.T) { if a := 1 == 1; a { // 声明 加 条件判断 t.Log("
阅读全文
posted @
2021-08-30 00:29
OwlInTheOaktree
阅读(50)
推荐(0) 编辑
Go语言学习 _基础001
摘要:Go语言学习 _基础001 HelloWorld package main // main 函数必须处于 main 包中 不管是在什么路径下 反正就是要有main包 import ( // 引入 包 对多个包的 引入可以这样简写 "fmt" // 对于单个包 : import "fmt" 即可 "o
阅读全文
posted @
2021-08-29 18:55
OwlInTheOaktree
阅读(46)
推荐(0) 编辑