func (g *GitClone) FlaglyHandle() error { if g.Repo == "" { return flagly.Error("error: repo is empty") } fmt.Printf("git clone\n %+v\n %+v\n", g.Parent, g) return nil }
func (b *Base64) FlaglyHandle() error { if b.Content == "" { return flagly.Error("missing content") } if b.IsDecode { ret, err := base64.URLEncoding.DecodeString(b.Content) if err != nil { return err } println(string(ret)) } else { ret := base64.URLEncoding.EncodeToString([]byte(b.Content)) println(ret) } return nil }