all: apply modernisers
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 2m48s
Test / ShareFS (push) Successful in 3m53s
Test / Hakurei (push) Successful in 4m0s
Test / Sandbox (race detector) (push) Successful in 5m37s
Test / Hakurei (race detector) (push) Successful in 6m40s
Test / Flake checks (push) Successful in 1m12s
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 2m48s
Test / ShareFS (push) Successful in 3m53s
Test / Hakurei (push) Successful in 4m0s
Test / Sandbox (race detector) (push) Successful in 5m37s
Test / Hakurei (race detector) (push) Successful in 6m40s
Test / Flake checks (push) Successful in 1m12s
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"hakurei.app/check"
|
||||
)
|
||||
@@ -78,17 +79,17 @@ type FSImplError struct{ Value FilesystemConfig }
|
||||
|
||||
func (f FSImplError) Error() string {
|
||||
implType := reflect.TypeOf(f.Value)
|
||||
var name string
|
||||
for implType != nil && implType.Kind() == reflect.Ptr {
|
||||
name += "*"
|
||||
var buf strings.Builder
|
||||
for implType != nil && implType.Kind() == reflect.Pointer {
|
||||
buf.WriteByte('*')
|
||||
implType = implType.Elem()
|
||||
}
|
||||
if implType != nil {
|
||||
name += implType.Name()
|
||||
buf.WriteString(implType.Name())
|
||||
} else {
|
||||
name += "nil"
|
||||
buf.WriteString("nil")
|
||||
}
|
||||
return fmt.Sprintf("implementation %s not supported", name)
|
||||
return "implementation " + buf.String() + " not supported"
|
||||
}
|
||||
|
||||
// FilesystemConfigJSON is the [json] adapter for [FilesystemConfig].
|
||||
|
||||
Reference in New Issue
Block a user