修复相关BUG + 增加单元测试, 覆盖率100%
This commit is contained in:
@ -9,12 +9,12 @@ package consts
|
||||
|
||||
type HttpScheme string
|
||||
|
||||
func (hs *HttpScheme) String() string {
|
||||
return string(*hs)
|
||||
func (hs HttpScheme) String() string {
|
||||
return string(hs)
|
||||
}
|
||||
|
||||
func (hs *HttpScheme) MarshalJSON() ([]byte, error) {
|
||||
return []byte(hs.String()), nil
|
||||
func (hs HttpScheme) MarshalJSON() ([]byte, error) {
|
||||
return []byte(`"` + hs.String() + `"`), nil
|
||||
}
|
||||
|
||||
var (
|
||||
|
Reference in New Issue
Block a user