Touch-up codespaces exporting functionality

This commit is contained in:
Mislav Marohnić 2021-10-25 15:45:10 +02:00
parent a5fa70a07d
commit 905cb3b9fa
2 changed files with 3 additions and 0 deletions

View file

@ -177,6 +177,7 @@ type CodespaceConnection struct {
HostPublicKeys []string `json:"hostPublicKeys"`
}
// CodespaceFields is the list of exportable fields for a codespace.
var CodespaceFields = []string{
"name",
"owner",

View file

@ -158,6 +158,8 @@ func (pi *portInfo) ExportData(fields []string) *map[string]interface{} {
data[f] = pi.Label()
case "browseUrl":
data[f] = pi.BrowseURL()
default:
panic("unkown field: " + f)
}
}