Documentation ¶
Index ¶
Constants ¶
View Source
const (
)Variables ¶
View Source
var (
CoAuthorsFilePath string
)
Functions ¶
func WriteCoauthorsContent ¶ added in v0.7.0
func WriteCoauthorsContent(cc CoAuthorsFileContent) error
func WriteCoauthorsContentToFilePath ¶ added in v0.7.0
func WriteCoauthorsContentToFilePath(path string, cc CoAuthorsFileContent) error
Types ¶
type Author ¶
func MustParseOne ¶
MustParseOne parses an author string into an Author and panics if parsing fails
func (Author) CoauthorTag ¶
func (Author) CoauthorTagBytes ¶
func (Author) InitialsFromName ¶
type AuthorList ¶ added in v0.6.1
type AuthorList struct {
Members []*Author `json:"members"`
}
AuthorList is a helper type to support string format when printing a list of authors
func (AuthorList) SortBy ¶ added in v0.6.1
func (m AuthorList) SortBy(less func(left, right *Author) bool)
func (AuthorList) String ¶ added in v0.6.1
func (m AuthorList) String() string
String implements Stringer to format our list output as a string
func (AuthorList) WriteToTable ¶ added in v0.6.1
func (m AuthorList) WriteToTable(table *tablewriter.Table)
type AuthorWithInitials ¶
type CoAuthorsFileContent ¶
func ReadCoAuthorsContent ¶
func ReadCoAuthorsContent() (CoAuthorsFileContent, error)
func ReadCoAuthorsContentFromBytes ¶
func ReadCoAuthorsContentFromBytes(b []byte) (CoAuthorsFileContent, error)
func ReadCoAuthorsContentFromFilePath ¶ added in v0.6.1
func ReadCoAuthorsContentFromFilePath(filePath string) (CoAuthorsFileContent, error)
func (CoAuthorsFileContent) FindAndFormatAsList ¶
func (f CoAuthorsFileContent) FindAndFormatAsList(initials ...string) []string
func (CoAuthorsFileContent) FindInitialsFromCoAuthorStrings ¶
func (f CoAuthorsFileContent) FindInitialsFromCoAuthorStrings(ss ...string) []string
func (CoAuthorsFileContent) LookupByInitials ¶
func (f CoAuthorsFileContent) LookupByInitials(initials ...string) []Author
Click to show internal directories.
Click to hide internal directories.