Repository Details
Shared by
HelloGitHub Rating
0 ratings
Free•MIT
Claim
Discuss
Collect
Share
6.9k
Stars
No
Chinese
Go
Language
Yes
Active
33
Contributors
42
Issues
No
Organization
None
Latest
342
Forks
MIT
License
More
一个封装好的 OS 三方库,解决了 Go 使用 OS 标准库错误处理的麻烦。如果没有它,打开一个文件查找一个关键字再统计下数量,你至少会需要 2-3 个异常处理的逻辑。有了它,只需要:
```go
numErrors, err := script.File("test.txt").Match("Error").CountLines()
// 等同于 grep Error test.txt | wc -l
```
Included in:
Vol.39
Comments
Rating:
No comments yet