func ProjectsInfo(info []models.ProjectInfo, jsonFlag bool) {
	if jsonFlag {
		JSON(info)
		return
	}
	var rows [][]string
	for _, projectInfo := range info {
		rows = append(rows, []string{projectInfo.ID, projectInfo.Name, projectInfo.Description, projectInfo.CreatedAt})
	}
	Table([]string{"id", "name", "description", "created at"}, rows, TableOptions())
}
ProjectsInfo print info of multiple projects
package printer
import (
	"encoding/json"
	"fmt"
	"math"
	"sort"
	"strings"
	"time"
	"github.com/DopplerHQ/cli/pkg/models"
	"github.com/DopplerHQ/cli/pkg/utils"
	"gopkg.in/gookit/color.v1"
)
func ConfigLogs(logs []models.ConfigLog, number int, jsonFlag bool) {
	maxLogs := int(math.Min(float64(len(logs)), float64(number)))
	logs = logs[0:maxLogs]
	if jsonFlag {
		JSON(logs)
		return
	}
	for _, log := range logs {
		ConfigLog(log, false, false)
	}
}
func ConfigLog(log models.ConfigLog, jsonFlag bool, diff bool) {
	if jsonFlag {
		JSON(log)
		return
	}
	dateTime, err := time.Parse(time.RFC3339, log.CreatedAt)
	fmt.Println("Log " + log.ID)
	fmt.Println("User: " + log.User.Name + " <" + log.User.Email + ">")
	if err == nil {
		fmt.Println("Date: " + dateTime.In(time.Local).String())
	}
	fmt.Println("")
	fmt.Println("\t" + log.Text)
	fmt.Println("")
	if diff && len(log.Diff) > 0 {
		fmt.Println("")
		for i, logDiff := range log.Diff {
			if i != 0 {
				fmt.Print("\n")
			}
			if logDiff.Name == "" {
				color.Red.Println(logDiff.Removed)
				color.Green.Println(logDiff.Added)
			} else {
				color.Red.Println("-", logDiff.Name, "=", logDiff.Removed)
				color.Green.Println("+", logDiff.Name, "=", logDiff.Added)
			}
		}
	}
}
func ActivityLogs(logs []models.ActivityLog, number int, jsonFlag bool) {
	maxLogs := int(math.Min(float64(len(logs)), float64(number)))
	logs = logs[0:maxLogs]
	if jsonFlag {
		JSON(logs)
		return
	}
	for _, log := range logs {
		ActivityLog(log, false, false)
	}
}
func ActivityLog(log models.ActivityLog, jsonFlag bool, diff bool) {
	if jsonFlag {
		JSON(log)
		return
	}
	dateTime, err := time.Parse(time.RFC3339, log.CreatedAt)
	fmt.Println("Log " + log.ID)
	fmt.Println("User: " + log.User.Name + " <" + log.User.Email + ">")
	if err == nil {
		fmt.Println("Date: " + dateTime.In(time.Local).String())
	}
	fmt.Println("")
	fmt.Println("\t" + log.Text)
	fmt.Println("")
}
func JSON(structure interface{}) {
	resp, err := json.Marshal(structure)
	if err != nil {
		utils.HandleError(err)
	}
	fmt.Println(string(resp))
}
func ConfigInfo(info models.ConfigInfo, jsonFlag bool) {
	if jsonFlag {
		JSON(info)
		return
	}
	rows := [][]string{{info.Name, info.InitialFetchAt, info.LastFetchAt, info.CreatedAt, info.Environment, info.Project}}
	Table([]string{"name", "initial fetch", "last fetch", "created at", "environment", "project"}, rows, TableOptions())
}
func ConfigsInfo(info []models.ConfigInfo, jsonFlag bool) {
	if jsonFlag {
		JSON(info)
		return
	}
	var rows [][]string
	for _, configInfo := range info {
		rows = append(rows, []string{configInfo.Name, configInfo.InitialFetchAt, configInfo.LastFetchAt, configInfo.CreatedAt,
			configInfo.Environment, configInfo.Project})
	}
	Table([]string{"name", "initial fetch", "last fetch", "created at", "environment", "project"}, rows, TableOptions())
}
func EnvironmentsInfo(info []models.EnvironmentInfo, jsonFlag bool) {
	if jsonFlag {
		JSON(info)
		return
	}
	var rows [][]string
	for _, environmentInfo := range info {
		rows = append(rows, []string{environmentInfo.ID, environmentInfo.Name, environmentInfo.InitialFetchAt,
			environmentInfo.CreatedAt, environmentInfo.Project})
	}
	Table([]string{"id", "name", "initial fetch", "created at", "project"}, rows, TableOptions())
}
func EnvironmentInfo(info models.EnvironmentInfo, jsonFlag bool) {
	if jsonFlag {
		JSON(info)
		return
	}
	rows := [][]string{{info.ID, info.Name, info.InitialFetchAt, info.CreatedAt, info.Project}}
	Table([]string{"id", "name", "initial fetch", "created at", "project"}, rows, TableOptions())
}