func (i *IntSlice) Serialize() string {
	jsonBytes, _ := json.Marshal(i.slice)
	return fmt.Sprintf("%s%s", slPfx, string(jsonBytes))
}
Serialize allows IntSlice to fulfill Serializer
package cli
import (
	"encoding/json"
	"flag"
	"fmt"
	"strconv"
	"strings"
)
type IntSlice struct {
	slice      []int
	hasBeenSet bool
}
func NewIntSlice(defaults ...int) *IntSlice {
	return &IntSlice{slice: append([]int{}, defaults...)}
}
func (i *IntSlice) SetInt(value int) {
	if !i.hasBeenSet {
		i.slice = []int{}
		i.hasBeenSet = true
	}
	i.slice = append(i.slice, value)
}
func (i *IntSlice) Set(value string) error {
	if !i.hasBeenSet {
		i.slice = []int{}
		i.hasBeenSet = true
	}
	if strings.HasPrefix(value, slPfx) {
		_ = json.Unmarshal([]byte(strings.Replace(value, slPfx, "", 1)), &i.slice)
		i.hasBeenSet = true
		return nil
	}
	tmp, err := strconv.ParseInt(value, 0, 64)
	if err != nil {
		return err
	}
	i.slice = append(i.slice, int(tmp))
	return nil
}
func (i *IntSlice) String() string {
	return fmt.Sprintf("%#v", i.slice)
}