greenlight/internal/data/runtime.go

17 lines
239 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
}