mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-29 14:46:38 +08:00
* ♻️ refactor: move file directory * ♻️ refactor: move file directory * ♻️ refactor: support multiple config methods * 🔥 del: remove unused code * 💩 refactor: Refactor channel management and synchronization * 💄 improve: add channel website * ✨ feat: allow recording 0 consumption
16 lines
238 B
Go
16 lines
238 B
Go
package requester
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type Marshaller interface {
|
|
Marshal(value any) ([]byte, error)
|
|
}
|
|
|
|
type JSONMarshaller struct{}
|
|
|
|
func (jm *JSONMarshaller) Marshal(value any) ([]byte, error) {
|
|
return json.Marshal(value)
|
|
}
|