From efc418e5fd8155ce98275a673c8f0e03569fd73e Mon Sep 17 00:00:00 2001 From: Urban Klinc Date: Fri, 27 Nov 2020 09:37:16 +0100 Subject: [PATCH] Fix typo, rework readme --- pkg/codegen/options.go | 2 +- pkg/options/README.adoc | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/codegen/options.go b/pkg/codegen/options.go index f911e66fd..f3e355059 100644 --- a/pkg/codegen/options.go +++ b/pkg/codegen/options.go @@ -85,7 +85,7 @@ func procOptions(mm ...string) (dd []*optionsDef, err error) { return dd, nil } -// Custom UnmarshelYAML function for +// Custom UnmarshalYAML function for func (pd *optionsPropDefault) UnmarshalYAML(n *yaml.Node) error { val := n.Value diff --git a/pkg/options/README.adoc b/pkg/options/README.adoc index 581faa056..c9c87c1f4 100644 --- a/pkg/options/README.adoc +++ b/pkg/options/README.adoc @@ -6,9 +6,10 @@ The name of the .YAML will dedicate the name of the .gen.go file e.g. fileName1. The contents of the .YAML file should look like this: - name: + name: ... - imports: + imports: + - ... props - name: ... @@ -19,14 +20,13 @@ The contents of the .YAML file should look like this: **name** -It is the name of the + - It is the name of the struct -name: name of option -imports - the list of needed imports -props: - name -> name of variable -props: - type -> the type of variable if not given it is "string" by -default -props: - env -> environment value that if it is not defined will be auto -generated from "name" and "props: - name" -props: - default -> the default value that is asigned to the "prop" - - strings should be given in double quotations if they are to be qouted +**imports** + - The list of imports that are needed, if there are no imporsts you may skip this step + +**props** + - props: - *name* -> name of variable + - props: - *type* -> the type of variable if not given it is "string" by default + - props: - *env* -> environment value that if it is not defined will be auto generated from "name" and "props: - name" + - props: - *default* -> the default value that is asigned to the "prop" strings should be given in double quotations if they are to be qouted