func newNewCmd() *cobra.Command {
	c := &newCmd{}
	newCmd := &cobra.Command{
		Use:                   "new",
		Short:                 "Create gist file",
		Aliases:               []string{},
		DisableFlagsInUseLine: true,
		SilenceUsage:          true,
		SilenceErrors:         true,
		RunE: func(cmd *cobra.Command, args []string) error {
			if err := c.meta.init(args); err != nil {
				return err
			}
			return c.run(args)
		},
	}
	f := newCmd.Flags()
	f.BoolVarP(&c.private, "private", "p", false, "make private")
	return newCmd
}
newNewCmd creates a new new command
package cmd
import (
	"context"
	"errors"
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"github.com/b4b4r07/gist/pkg/gist"
	"github.com/b4b4r07/gist/pkg/shell"
	"github.com/b4b4r07/gist/pkg/spin"
	"github.com/manifoldco/promptui"
	"github.com/spf13/cobra"
)
type newCmd struct {
	meta
	private bool
	validator promptui.ValidateFunc
}