3 Star 3 Fork 1

Gitee 极速下载 / gopsutil

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/shirou/gopsutil/
Clone or Download
types.go 340 Bytes
Copy Edit Raw Blame History
package host
import (
"fmt"
)
type Warnings struct {
List []error
}
func (w *Warnings) Add(err error) {
w.List = append(w.List, err)
}
func (w *Warnings) Reference() error {
if len(w.List) > 0 {
return w
} else {
return nil
}
}
func (w *Warnings) Error() string {
return fmt.Sprintf("Number of warnings: %v", len(w.List))
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/gopsutil.git
git@gitee.com:mirrors/gopsutil.git
mirrors
gopsutil
gopsutil
v3.21.2

Search

344bd9b3 5694891 D2dac590 5694891