Skip to content

Commit

Permalink
add some sponsor and fix some code format
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterhug committed Dec 23, 2021
1 parent d697e3c commit 666e741
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

(🧍‍♂️原始文档托管)Github 代码仓库: [https://github.com/hunterhug/goa.c](https://github.com/hunterhug/goa.c)

(🤔一直保持最新)Docsify风格的网站[https://goa.lenggirl.com](https://goa.lenggirl.com)
(🤔一直保持最新)Docsify 风格的网站[https://goa.lenggirl.com](https://goa.lenggirl.com)

**目前有部分网站,未经许可分发了此系列内容,存在更新延后的风险,之前存在部分的笔误,都已经更正了,请以此网站为准!**

本地离线阅读: `docker run --name algorithm_docsify -d -p 12346:3000 hunterhug/algorithm:docsify` ,打开 [http://127.0.0.1:12346](http://127.0.0.1:12346)

联系作者: [https://github.com/hunterhug](https://github.com/hunterhug) ,邮箱: [email protected],微信: ChenPika2021
联系作者: [https://github.com/hunterhug](https://github.com/hunterhug) ,邮箱: [email protected] ,知乎: [https://www.zhihu.com/people/chenpika](https://www.zhihu.com/people/chenpika)

## 目录

Expand Down Expand Up @@ -100,9 +100,12 @@

| 日期 | 组织/个人 | 说明 |
| ----- | ------- | ------- |
| 20210918 | 古寒飞 | 200.00RMB |
| 20200922 | 胡小东 | 9.50RMB |
| 20200627 | 杨某 | 99.99RMB |
| 2021.11.11 | peter锦锋 | 18.50 RMB |
| 2021.09.18 | 古寒飞 | 200.00 RMB |
| 2021.08.31 | crypto ivil | 9.50 RMB |
| 2021.08.19 | 礼服黑面侠 | 9.50 RMB |
| 2020.09.22 | 胡小东 | 9.50 RMB |
| 2020.06.27 | 杨某 | 99.99 RMB |

感谢她(他)们给作者送去温暖,让作者有更好的动力边吃辣条边写文章!

Expand Down
4 changes: 2 additions & 2 deletions basic/rescuvie.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func main() {

他的递归过程如下:

```
```go
RescuvieTail(5, 1)
RescuvieTail(4, 1*5)=RescuvieTail(4, 5)
RescuvieTail(3, 5*4)=RescuvieTail(3, 20)
Expand Down Expand Up @@ -126,7 +126,7 @@ func main() {

输出:

```
```go
1
2
3
Expand Down
4 changes: 2 additions & 2 deletions golang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ go build main.go

执行二进制:

```
```go
./main
```

将会打印出以下结果:

```
```go
init will be before hello world
hello world
today times:2019-12-09 13:14:14.383118 +0800 CST m=+0.000199077
Expand Down
4 changes: 2 additions & 2 deletions golang/concurrent.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ fatal error: all goroutines are asleep - deadlock!

因为 `range` 会一直读取消息,如果没有消息将会堵塞,主协程堵塞了,`Golang` 会认为死锁了,这时候我们可以关闭信道后再打印,如:

```
```go
package main

import "fmt"
Expand Down Expand Up @@ -370,7 +370,7 @@ func main() {

我们需要实现并发安全,同一时间只能允许一个协程修改金额,我们需要加锁,如下:

```
```go
type Money struct {
lock sync.Mutex //
amount int64
Expand Down
10 changes: 5 additions & 5 deletions golang/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func main() {

输出:

```
```go
int,2
2
3
Expand All @@ -80,7 +80,7 @@ a is type: int

我们也可以将函数的参数也定为 `interface`,和变量的定义一样:

```
```go
func print(i interface{}) {
fmt.Println(i)
}
Expand All @@ -99,7 +99,7 @@ func print(i interface{}) {

当然,结构体里面的字段也可以是 `interface{}`

```
```go
type H struct {
A interface{}
B interface{}
Expand Down Expand Up @@ -258,7 +258,7 @@ a2: i love you

我们可以定义一个接口类型,使用 `type 接口名 interface`,这时候不再是 `interface{}`

```
```go
// 定义一个接口,有一个方法
type A interface {
Println()
Expand Down Expand Up @@ -303,7 +303,7 @@ func (a2 *A2Instance) Printf() int {

我们要求结构体必须实现某些方法,所以可以定义一个接口类型的变量,然后将结构体赋值给它:

```
```go
// 定义一个A接口类型的变量
var a A
// 将具体的结构体赋予该变量
Expand Down
2 changes: 1 addition & 1 deletion golang/logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if a > 0{
切片遍历出来的结果为:数据下标,数据,字典遍历出来的结果为:数据的键,数据的值:
```
```go
0 1
1 2
2 3
Expand Down

0 comments on commit 666e741

Please sign in to comment.