package jen// Options specifies options for the Custom methodtypeOptionsstruct { Open string Close string Separator string Multi bool}// Custom renders a customized statement list. Pass in options to specify multi-line, and tokens for open, close, separator.func ( Options, ...Code) *Statement {returnnewStatement().Custom(, ...)}// Custom renders a customized statement list. Pass in options to specify multi-line, and tokens for open, close, separator.func ( *Group) ( Options, ...Code) *Statement { := Custom(, ...) .items = append(.items, )return}// Custom renders a customized statement list. Pass in options to specify multi-line, and tokens for open, close, separator.func ( *Statement) ( Options, ...Code) *Statement { := &Group{close: .Close,items: ,multi: .Multi,name: "custom",open: .Open,separator: .Separator, } * = append(*, )return}// CustomFunc renders a customized statement list. Pass in options to specify multi-line, and tokens for open, close, separator.func ( Options, func(*Group)) *Statement {returnnewStatement().CustomFunc(, )}// CustomFunc renders a customized statement list. Pass in options to specify multi-line, and tokens for open, close, separator.func ( *Group) ( Options, func(*Group)) *Statement { := CustomFunc(, ) .items = append(.items, )return}// CustomFunc renders a customized statement list. Pass in options to specify multi-line, and tokens for open, close, separator.func ( *Statement) ( Options, func(*Group)) *Statement { := &Group{close: .Close,multi: .Multi,name: "custom",open: .Open,separator: .Separator, } () * = append(*, )return}
The pages are generated with Goldsv0.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.