-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade go and golangci-lint version
- Loading branch information
Showing
8 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
run: | ||
skip-files: | ||
issues: | ||
exclude-files: | ||
- regexes.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/hypersequent/zen/custom/decimal | ||
|
||
go 1.21 | ||
go 1.23 | ||
|
||
replace github.com/hypersequent/zen => ../.. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/hypersequent/zen/custom/optional | ||
|
||
go 1.21 | ||
go 1.23 | ||
|
||
replace github.com/hypersequent/zen => ../.. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/hypersequent/zen | ||
|
||
go 1.21 | ||
go 1.23 | ||
|
||
require github.com/stretchr/testify v1.8.3 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
go 1.21 | ||
go 1.23 | ||
|
||
use ( | ||
. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
func (c *Converter) convertStructTopLevel(t reflect.Type) string | ||
func (c *Converter) getType(t reflect.Type, name string, indent int) string | ||
|
||
func (c *Converter) convertStruct(input reflect.Type, indent int) string | ||
func (c *Converter) getTypeStruct(input reflect.Type, indent int) string | ||
|
||
func (c *Converter) convertField(f reflect.StructField, indent int, optional, nullable, anonymous bool) (string, bool) | ||
func (c *Converter) getTypeField(f reflect.StructField, indent int, optional, nullable bool) string | ||
|
||
func (c *Converter) convertSliceAndArray(t reflect.Type, name, validate string, indent int) string | ||
func (c *Converter) getTypeSliceAndArray(t reflect.Type, name string, indent int) string | ||
|
||
func (c *Converter) convertMap(t reflect.Type, name, validate string, indent int) string | ||
func (c *Converter) getTypeMap(t reflect.Type, name string, indent int) string | ||
|
||
func (c *Converter) validateString(validate string) string | ||
func (c *Converter) validateNumber(validate string) string | ||
|
||
type Converter struct { | ||
prefix string | ||
structs int | ||
outputs map[string]entry | ||
custom map[string]CustomFn | ||
stack []meta | ||
} | ||
|
||
type entry struct { | ||
order int | ||
data string | ||
} | ||
|
||
type meta struct { | ||
Name string | ||
SelfRef bool | ||
} | ||
|
||
// name, generic, validate, indent | ||
type CustomFn func(*Converter, reflect.Type, string, string, string, int) string | ||
|
||
type byOrder []entry | ||
|
||
func (a byOrder) Len() int { return len(a) } | ||
func (a byOrder) Swap(i, j int) { a[i], a[j] = a[j], a[i] } | ||
func (a byOrder) Less(i, j int) bool { return a[i].order < a[j].order } | ||
|
||
func (c *Converter) AddType(input interface{}) | ||
func (c *Converter) Convert(input interface{}) string | ||
func (c *Converter) ConvertSlice(inputs []interface{}) string | ||
func (c *Converter) ConvertType(t reflect.Type, name string, validate string, indent int) string | ||
func (c *Converter) Export() string |