16 lines
238 B
Go
16 lines
238 B
Go
package data
|
|
|
|
import (
|
|
"fmt"
|
|
"strconv"
|
|
)
|
|
|
|
type Runtime int32
|
|
|
|
func (r Runtime) MarshalJSON() ([]byte, error) {
|
|
jsonValue := fmt.Sprintf("%d mins", r)
|
|
|
|
quotedJSONValue := strconv.Quote(jsonValue)
|
|
return []byte(quotedJSONValue), nil
|
|
}
|