File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -80,12 +80,9 @@ func (tv *TLSVersion) UnmarshalYAML(unmarshal func(interface{}) error) error {
8080 return fmt .Errorf ("unknown TLS version: %s" , s )
8181}
8282
83- func (tv * TLSVersion ) MarshalYAML () (interface {}, error ) {
84- if tv == nil || * tv == 0 {
85- return []byte ("null" ), nil
86- }
83+ func (tv TLSVersion ) MarshalYAML () (interface {}, error ) {
8784 for s , v := range TLSVersions {
88- if * tv == v {
85+ if tv == v {
8986 return s , nil
9087 }
9188 }
@@ -106,12 +103,9 @@ func (tv *TLSVersion) UnmarshalJSON(data []byte) error {
106103}
107104
108105// MarshalJSON implements the json.Marshaler interface for TLSVersion.
109- func (tv * TLSVersion ) MarshalJSON () ([]byte , error ) {
110- if tv == nil || * tv == 0 {
111- return []byte ("null" ), nil
112- }
106+ func (tv TLSVersion ) MarshalJSON () ([]byte , error ) {
113107 for s , v := range TLSVersions {
114- if * tv == v {
108+ if tv == v {
115109 return []byte (s ), nil
116110 }
117111 }
You can’t perform that action at this time.
0 commit comments