摘要:
Right click the function name. Select item 'Go: Generate Unit Tests for Function' in the pop-up menu: A test file named <file name>_test.go is generat
阅读全文
posted @ 2023-09-21 09:36
ZhangZhihuiAAA
阅读(53)
推荐(0)
摘要:
Common protocols that handle exchanging data between client and server applications:• HTTP protocol: This is more of a text-based protocol and is cons
阅读全文
posted @ 2023-09-19 14:01
ZhangZhihuiAAA
阅读(34)
推荐(0)
摘要:
Never use global variables
阅读全文
posted @ 2023-09-19 12:41
ZhangZhihuiAAA
阅读(21)
推荐(0)
摘要:
fake.go package fake import "fmt" type ExampleStruct struct { Item1 string Item2 string Item3 string } func (e ExampleStruct) LogLine() { fmt.Printf("
阅读全文
posted @ 2023-09-19 11:18
ZhangZhihuiAAA
阅读(14)
推荐(0)
摘要:
fibonacci.go package algorithms // Dynamic Programming func Fibonacci1(n int) int { if n <= 0 { return 0 } if n <= 2 { return 1 } previous1 := 1 previ
阅读全文
posted @ 2023-09-18 20:50
ZhangZhihuiAAA
阅读(15)
推荐(0)
摘要:
sort.go package algorithms func MergeSort(items []int) []int { n := len(items) var combined []int switch { case n <= 1: combined = items case n == 2:
阅读全文
posted @ 2023-09-17 22:35
ZhangZhihuiAAA
阅读(11)
推荐(0)
摘要:
$ ls readme readme $ zip readme zip error: Nothing to do! (readme.zip) $ ls readme* readme $ zip readme.zip readme adding: readme (deflated 4%) $ ls r
阅读全文
posted @ 2023-09-14 16:59
ZhangZhihuiAAA
阅读(17)
推荐(0)
摘要:
Adding user to the docker group can fix this issue: zzh@ZZHPC:~$ sudo usermod -aG docker zzh zzh@ZZHPC:~$ newgrp docker zzh@ZZHPC:~$ docker run hello-
阅读全文
posted @ 2023-09-14 09:25
ZhangZhihuiAAA
阅读(18)
推荐(0)
posted @ 2023-09-13 12:08
ZhangZhihuiAAA
阅读(7)
推荐(0)
摘要:
zzh@ZZHPC:~$ sudo snap info docker name: docker summary: Docker container runtime publisher: Canonical✓ store-url: https://snapcraft.io/docker contact
阅读全文
posted @ 2023-09-13 10:01
ZhangZhihuiAAA
阅读(30)
推荐(0)