Skip to content

chore: move app URL parsing to its own package #11651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
linting
  • Loading branch information
Emyrk committed Jan 16, 2024
commit 1ea9a8ba4f6f8af775ae3c203f9006d84df2384c
18 changes: 9 additions & 9 deletions cli/clibase/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,24 @@ func (i *Validator[T]) Type() string {
return i.Value.Type()
}

func (u *Validator[T]) MarshalYAML() (interface{}, error) {
m, ok := any(u.Value).(yaml.Marshaler)
func (i *Validator[T]) MarshalYAML() (interface{}, error) {
m, ok := any(i.Value).(yaml.Marshaler)
if !ok {
return u.Value, nil
return i.Value, nil
}
return m.MarshalYAML()
}

func (u *Validator[T]) UnmarshalYAML(n *yaml.Node) error {
return n.Decode(u.Value)
func (i *Validator[T]) UnmarshalYAML(n *yaml.Node) error {
return n.Decode(i.Value)
}

func (u *Validator[T]) MarshalJSON() ([]byte, error) {
return json.Marshal(u.Value)
func (i *Validator[T]) MarshalJSON() ([]byte, error) {
return json.Marshal(i.Value)
}

func (u *Validator[T]) UnmarshalJSON(b []byte) error {
return json.Unmarshal(b, u.Value)
func (i *Validator[T]) UnmarshalJSON(b []byte) error {
return json.Unmarshal(b, i.Value)
}

func (*Validator[T]) IsValidator() {}
Expand Down