Skip to content

Commit c1b0030

Browse files
committed
refactoring
1 parent 5199a3e commit c1b0030

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

parser/functions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
)
2929

3030
// string utils (thanks to https://www.dotnetperls.com/between-before-after-go)
31+
3132
func between(value string, a string, b string) string {
3233
// Get substring between two strings.
3334
posFirst := strings.Index(value, a)
@@ -68,7 +69,6 @@ func after(value string, a string) string {
6869
}
6970

7071

71-
7272
// parser functions
7373

7474
func getID(line string) string {

parser/parser.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ func Parse (file *os.File) error {
9696
}
9797

9898
// Create a Schema struct
99-
TLstruct := new(jsonStruct.Schema)
100-
TLstruct.Constructors = constructors
101-
TLstruct.Methods = methods
99+
TLStruct := new(jsonStruct.Schema)
100+
TLStruct.Constructors = constructors
101+
TLStruct.Methods = methods
102102

103103
// Convert struct to json
104-
jsonBytes, err := json.Marshal(TLstruct); if err != nil {return err}
104+
jsonBytes, err := json.Marshal(TLStruct); if err != nil {return err}
105105

106106
// Write json to file
107107
_, err = output.Write(jsonBytes); if err != nil {return err}

0 commit comments

Comments
 (0)