1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
This commit is contained in:
2022-04-07 09:15:12 +08:00
parent 44aae0c3b0
commit 8736d84913
5 changed files with 26 additions and 26 deletions

View File

@ -13,7 +13,7 @@ import (
// 下划线
type SnakeCase struct {
Value interface{}
Value any
}
func (c SnakeCase) MarshalJSON() ([]byte, error) {
@ -35,7 +35,7 @@ func (c SnakeCase) MarshalJSON() ([]byte, error) {
// 驼峰
type CamelCase struct {
Value interface{}
Value any
}
func (c CamelCase) MarshalJSON() ([]byte, error) {
@ -106,7 +106,7 @@ func NewBuffer() *Buffer {
return &Buffer{Buffer: new(bytes.Buffer)}
}
func (b *Buffer) Append(i interface{}) *Buffer {
func (b *Buffer) Append(i any) *Buffer {
switch val := i.(type) {
case int:
b.append(strconv.Itoa(val))