Add documentation comments to exported symbols across all remaining smaller packages including cmd/gen-docs, context, internal/browser, internal/gh, internal/ghcmd, internal/ghinstance, internal/ghrepo, internal/keyring, internal/run, internal/safepaths, internal/tableprinter, internal/text, internal/update, pkg/cmd/accessibility, pkg/cmd/actions, pkg/cmd/alias, pkg/cmd/api, pkg/cmd/browse, pkg/cmd/cache, pkg/cmd/completion, pkg/cmd/copilot, pkg/cmd/factory, pkg/cmd/gpg-key, pkg/cmd/label, pkg/cmd/licenses, pkg/cmd/org, pkg/cmd/preview, pkg/cmd/ssh-key, pkg/cmd/version, pkg/extensions, pkg/jsoncolor, pkg/markdown, pkg/option, pkg/set, pkg/ssh, pkg/surveyext, test, internal/authflow, and utils. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
34 lines
713 B
Go
34 lines
713 B
Go
package label
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/cli/cli/v2/pkg/cmdutil"
|
|
)
|
|
|
|
var labelFields = []string{
|
|
"color",
|
|
"createdAt",
|
|
"description",
|
|
"id",
|
|
"isDefault",
|
|
"name",
|
|
"updatedAt",
|
|
"url",
|
|
}
|
|
|
|
type label struct {
|
|
Color string `json:"color"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
Description string `json:"description"`
|
|
ID string `json:"id"`
|
|
IsDefault bool `json:"isDefault"`
|
|
Name string `json:"name"`
|
|
URL string `json:"url"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
// ExportData returns the requested fields as exportable data.
|
|
func (l *label) ExportData(fields []string) map[string]interface{} {
|
|
return cmdutil.StructExportData(l, fields)
|
|
}
|