Fix godoc examples
This commit is contained in:
parent
5356b604eb
commit
d5ee25ca35
@ -9,27 +9,21 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ExampleStructFieldMethodCallbacksRegistrator_DisableFieldType() {
|
func ExampleStructFieldMethodCallbacksRegistrator_DisableFieldType() {
|
||||||
fmt.Println(`
|
fmt.Println(`if registrator.IsEnabledFieldType(&Media{}) {
|
||||||
if registrator.IsEnabledFieldType(&Media{}) {
|
|
||||||
registrator.DisableFieldType(&Media{})
|
registrator.DisableFieldType(&Media{})
|
||||||
}
|
}`)
|
||||||
`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleStructFieldMethodCallbacksRegistrator_EnabledFieldType() {
|
func ExampleStructFieldMethodCallbacksRegistrator_EnabledFieldType() {
|
||||||
fmt.Println(`
|
fmt.Println(`if !registrator.IsEnabledFieldType(&Media{}) {
|
||||||
if !registrator.IsEnabledFieldType(&Media{}) {
|
|
||||||
println("not enabled")
|
println("not enabled")
|
||||||
}
|
}`)
|
||||||
`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleStructFieldMethodCallbacksRegistrator_EnableFieldType() {
|
func ExampleStructFieldMethodCallbacksRegistrator_EnableFieldType() {
|
||||||
fmt.Println(`
|
fmt.Println(`if !registrator.IsEnabledFieldType(&Media{}) {
|
||||||
if !registrator.IsEnabledFieldType(&Media{}) {
|
|
||||||
registrator.EnableFieldType(&Media{})
|
registrator.EnableFieldType(&Media{})
|
||||||
}
|
}`)
|
||||||
`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleStructFieldMethodCallbacksRegistrator_RegisteredFieldType() {
|
func ExampleStructFieldMethodCallbacksRegistrator_RegisteredFieldType() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user