func editGetTitleDescFromFile(filename string) (string, string, error) {
	var title, body string
	var lines []string
	content, err := ioutil.ReadFile(filename)
	if err != nil {
		return "", "", nil
	}
	lines = strings.Split(string(content), "\n")
	title = lines[0]
	body = strings.Join(lines[1:], "\n")
	return title, body, nil
}
editGetTitleDescFromFile returns the new title and description based on
the content of a file. The first line is considered the title, the
remaining is the description.
package cmd
import (
	"fmt"
	"io/ioutil"
	"strings"
	"github.com/zaquestion/lab/internal/git"
)
func getUpdateUsers(currentUsers []string, users []string, remove []string) ([]int, bool, error) {
	users = difference(union(currentUsers, users), remove)
	usersChanged := !same(currentUsers, users)
	var userIDs []int
	if usersChanged && len(users) == 0 {
		userIDs = []int{0}
	} else {
		userIDs = make([]int, len(users))
		for i, a := range users {
			if getUserID(a) == nil {
				return nil, false, fmt.Errorf("%s is not a valid username", a)
			}
			userIDs[i] = *getUserID(a)
		}
	}
	return userIDs, usersChanged, nil
}
func editGetTitleDescription(title string, body string, msgs []string, nFlag int) (string, string, error) {
	if len(msgs) > 0 {
		title = msgs[0]
		if len(msgs) > 1 {
			body = strings.Join(msgs[1:], "\n\n")
		}
		return title, body, nil
	}
	if nFlag != 0 {
		return title, body, nil
	}
	text, err := editText(title, body)
	if err != nil {
		return "", "", err
	}
	return git.Edit("EDIT", text)
}