3
0

Fix typo, rework readme

This commit is contained in:
Urban Klinc
2020-11-27 09:37:16 +01:00
parent e83b5258cb
commit efc418e5fd
2 changed files with 13 additions and 13 deletions

View File

@@ -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

View File

@@ -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