File: shared.go

package info (click to toggle)
gh 2.46.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,548 kB
  • sloc: sh: 227; makefile: 117
file content (33 lines) | stat: -rw-r--r-- 650 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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"`
}

func (l *label) ExportData(fields []string) map[string]interface{} {
	return cmdutil.StructExportData(l, fields)
}