Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golang learning临时笔记 #12

Open
woshidama323 opened this issue Apr 24, 2022 · 5 comments
Open

golang learning临时笔记 #12

woshidama323 opened this issue Apr 24, 2022 · 5 comments

Comments

@woshidama323
Copy link
Owner

https://pkg.go.dev/go.uber.org/fx#section-readme

fx 的使用

uface 中的已知问题

## 命令 lotus-shed election backtest  t029390 --height=594153 --count=10000
--height 
-- count
 不生效原因是 uface/v2版本的已知问题,等v3出来吧

https://github.com/urfave/cli/issues/1113

临时笔记

https://www.jianshu.com/p/94a9c41d503d

@woshidama323
Copy link
Owner Author

golang 日志选型

https://blog.logrocket.com/5-structured-logging-packages-for-go/

选择zap (来源uber)

@woshidama323
Copy link
Owner Author

一个比较好的go网站,后面整理
https://www.google.com/amp/s/golangbyexample.com/golang-comprehensive-tutorial/amp/

@woshidama323
Copy link
Owner Author

如何update 所有的依赖 go mod 模式下

https://hynek.me/til/go-mod-update/

go get -d -u -t ./...
go mod tidy

@woshidama323
Copy link
Owner Author

学习uml 类图

  1. 特殊符号
"+" 表示public
"-" 表示private
"#" 表示protected
不带符号的表示 default

抽象类

类名 以及抽象方法用斜体

接口

<<interface>>
棒棒糖表示方法

关系表示

Image

1. 实现关系

2. 泛化关系

3. 关联关系

Image

关联关系又分为依赖关联、聚合关联和组合关联三种类型

3.1 依赖关系
弱关联关系
3.2 聚合关联

Image

3.3 组合关联

Image

### 组合与聚合的区别

但是,在实际应用开发时,两个对象之间的关系到底是聚合还是组合,有时候很难区别。在Java中,仅从类代码本身是区分不了聚合和组合的。如果一定要区分,那么如果在删除整体对象的时候,必须删掉部分对象,那么就是组合关系,否则可能就是聚合关系

@woshidama323
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant