gitee.com/sy_183/go-common@v1.0.5-0.20231205030221-958cfe129b47/errors/not-avilable.go (about) 1 package errors 2 3 import "fmt" 4 5 type NotAvailable struct { 6 Target string 7 } 8 9 func NewNotAvailable(target string) NotAvailable { 10 return NotAvailable{Target: target} 11 } 12 13 func (e NotAvailable) Error() string { 14 return fmt.Sprintf("%s不可用", e.Target) 15 }