fix docs generate

This commit is contained in:
Michael Barz committed 2022-05-04 15:49:18 +02:00
1 parent 5ab09764aa
commit 2eb906a3ff
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ if err != nil {
log.Fatal(err) log.Fatal(err)
} }
replacer := strings.NewReplacer( replacer := strings.NewReplacer(
"github.com/owncloud/ocis/extensions/", "", "github.com/owncloud/ocis/v2/extensions/", "",
"/pkg/config/defaults", "", "/pkg/config/defaults", "",
) )
var fields []ConfigField var fields []ConfigField
@@ -95,7 +95,7 @@ func GetAnnotatedVariables(s interface{}) []ConfigField {
// and this should not be an issue then // and this should not be an issue then
if !value.IsZero() && value.Elem().CanInterface() { if !value.IsZero() && value.Elem().CanInterface() {
fields = append(fields, GetAnnotatedVariables(value.Elem().Interface())...) fields = append(fields, GetAnnotatedVariables(value.Elem().Interface())...)
} }
case reflect.Struct: case reflect.Struct:
fields = append(fields, GetAnnotatedVariables(value.Interface())...) fields = append(fields, GetAnnotatedVariables(value.Interface())...)
} }
@@ -28,7 +28,7 @@ if err != nil {
log.Fatal(err) log.Fatal(err)
} }
replacer := strings.NewReplacer( replacer := strings.NewReplacer(
"github.com/owncloud/ocis/extensions/", "", "github.com/owncloud/ocis/v2/extensions/", "",
"/pkg/config/defaults", "", "/pkg/config/defaults", "",
) )
var fields []ConfigField var fields []ConfigField
@@ -84,7 +84,7 @@ func GetAnnotatedVariables(s interface{}) []ConfigField {
// and this should not be an issue then // and this should not be an issue then
if !value.IsZero() && value.Elem().CanInterface() { if !value.IsZero() && value.Elem().CanInterface() {
fields = append(fields, GetAnnotatedVariables(value.Elem().Interface())...) fields = append(fields, GetAnnotatedVariables(value.Elem().Interface())...)
} }
case reflect.Struct: case reflect.Struct:
fields = append(fields, GetAnnotatedVariables(value.Interface())...) fields = append(fields, GetAnnotatedVariables(value.Interface())...)
} }
@@ -15,7 +15,7 @@ import (
func main() { func main() {
replacer := strings.NewReplacer( replacer := strings.NewReplacer(
"github.com/owncloud/ocis/extensions/", "", "github.com/owncloud/ocis/v2/extensions/", "",
"/pkg/config/defaults", "", "/pkg/config/defaults", "",
) )
cfg := map[string]string{ cfg := map[string]string{