MCPcopy Create free account
hub / github.com/astercloud/aster / GetSourceName

Function GetSourceName

pkg/stream/stream.go:37–43  ·  view source on GitHub ↗

GetSourceName 从 SourceEOF 错误中提取源流名称

(err error)

Source from the content-addressed store, hash-verified

35
36// GetSourceName 从 SourceEOF 错误中提取源流名称
37func GetSourceName(err error) (string, bool) {
38 var sErr *SourceEOF
39 if errors.As(err, &sErr) {
40 return sErr.Name, true
41 }
42 return "", false
43}
44
45// item 表示流中的单个值
46type item[T any] struct {

Callers 1

TestMergeNamed_SourceEOFFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestMergeNamed_SourceEOFFunction · 0.68