func ProjectsJSONPrint(t []dto.Project, w io.Writer) error {
	return json.NewEncoder(w).Encode(t)
}
ProjectsJSONPrint will print as JSON
package output
import (
	"encoding/csv"
	"encoding/json"
	"fmt"
	"io"
	"os"
	"text/template"
	"github.com/lucassabreu/clockify-cli/api/dto"
	"github.com/olekukonko/tablewriter"
	"golang.org/x/term"
)
func ProjectPrintQuietly(ws []dto.Project, w io.Writer) error {
	for _, wk := range ws {
		fmt.Fprintln(w, wk.ID)
	}
	return nil
}
func ProjectPrint(ws []dto.Project, w io.Writer) error {
	tw := tablewriter.NewWriter(w)
	tw.SetHeader([]string{"ID", "Name", "Client"})
	lines := make([][]string, len(ws))
	for i, w := range ws {
		client := ""
		if w.ClientID != "" {
			client = fmt.Sprintf("%s (%s)", w.ClientName, w.ClientID)
		}
		lines[i] = []string{
			w.ID,
			w.Name,
			client,
		}
	}
	if width, _, err := term.GetSize(int(os.Stdout.Fd())); err == nil {
		tw.SetColWidth(width / 3)
	}
	tw.AppendBulk(lines)
	tw.Render()
	return nil
}
func ProjectPrintWithTemplate(format string) func([]dto.Project, io.Writer) error {
	return func(ws []dto.Project, w io.Writer) error {
		t, err := template.New("tmpl").Parse(format)
		if err != nil {
			return err
		}
		for _, i := range ws {
			if err := t.Execute(w, i); err != nil {
				return err
			}
			fmt.Fprintln(w)
		}
		return nil
	}
}