package interp
import "strings"
func paramsTypeString(params []*itype ) string {
strs := make ([]string , 0 , len (params ))
for _ , param := range params {
strs = append (strs , param .str )
}
return strings .Join (strs , "," )
}
func methodsTypeString(fields []structField ) string {
strs := make ([]string , 0 , len (fields ))
for _ , field := range fields {
if field .embed {
str := methodsTypeString (field .typ .field )
if str != "" {
strs = append (strs , str )
}
continue
}
strs = append (strs , field .name +field .typ .str [4 :])
}
return strings .Join (strs , "; " )
}
func fieldsTypeString(fields []structField ) string {
strs := make ([]string , 0 , len (fields ))
for _ , field := range fields {
var repr strings .Builder
if !field .embed {
repr .WriteString (field .name )
repr .WriteByte (' ' )
}
repr .WriteString (field .typ .str )
strs = append (strs , repr .String ())
}
return strings .Join (strs , "; " )
}
The pages are generated with Golds v0.8.4 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .