ditch unused links
This commit is contained in:
parent
bc5582277e
commit
45ddb4ae9f
|
@ -33,7 +33,6 @@ var _ ActionsService = &ActionsServiceOp{}
|
|||
|
||||
type actionsRoot struct {
|
||||
Actions []Action `json:"actions"`
|
||||
Links []*LinkAction `json:"links"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
||||
|
@ -72,9 +71,6 @@ func (s *ActionsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Action
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
if m := root.Meta; m != nil {
|
||||
resp.Meta = m
|
||||
}
|
||||
|
|
|
@ -49,7 +49,6 @@ type domainRoot struct {
|
|||
|
||||
type domainsRoot struct {
|
||||
Domains []Domain `json:"domains"`
|
||||
Links []*LinkAction `json:"links"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
||||
|
@ -67,7 +66,6 @@ type domainRecordRoot struct {
|
|||
// DomainRecordsRoot is the root of a group of Domain Record responses
|
||||
type domainRecordsRoot struct {
|
||||
DomainRecords []DomainRecord `json:"domain_records"`
|
||||
Links []*LinkAction `json:"links"`
|
||||
}
|
||||
|
||||
// DomainRecord represents a DigitalOcean DomainRecord
|
||||
|
@ -124,9 +122,6 @@ func (s DomainsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Domain,
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
if m := root.Meta; m != nil {
|
||||
resp.Meta = m
|
||||
}
|
||||
|
@ -403,9 +398,6 @@ func (s *DomainsServiceOp) records(ctx context.Context, path string) ([]DomainRe
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
|
||||
return root.DomainRecords, resp, err
|
||||
}
|
||||
|
|
|
@ -501,9 +501,6 @@ func (s *DropletsServiceOp) Actions(ctx context.Context, dropletID int, opt *Lis
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
if m := root.Meta; m != nil {
|
||||
resp.Meta = m
|
||||
}
|
||||
|
|
4
keys.go
4
keys.go
|
@ -45,7 +45,6 @@ type KeyUpdateRequest struct {
|
|||
|
||||
type keysRoot struct {
|
||||
SSHKeys []Key `json:"ssh_keys"`
|
||||
Links []*LinkAction `json:"links"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
||||
|
@ -81,9 +80,6 @@ func (s *KeysServiceOp) List(ctx context.Context, opt *ListOptions) ([]Key, *Res
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
if m := root.Meta; m != nil {
|
||||
resp.Meta = m
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ type Region struct {
|
|||
|
||||
type regionsRoot struct {
|
||||
Regions []Region
|
||||
Links []*LinkAction `json:"links"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
||||
|
@ -57,9 +56,6 @@ func (s *RegionsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Region
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
if m := root.Meta; m != nil {
|
||||
resp.Meta = m
|
||||
}
|
||||
|
|
4
sizes.go
4
sizes.go
|
@ -40,7 +40,6 @@ func (s Size) String() string {
|
|||
|
||||
type sizesRoot struct {
|
||||
Sizes []Size
|
||||
Links []*LinkAction `json:"links"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
||||
|
@ -62,9 +61,6 @@ func (s *SizesServiceOp) List(ctx context.Context, opt *ListOptions) ([]Size, *R
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
if m := root.Meta; m != nil {
|
||||
resp.Meta = m
|
||||
}
|
||||
|
|
4
tags.go
4
tags.go
|
@ -112,7 +112,6 @@ type UntagResourcesRequest struct {
|
|||
|
||||
type tagsRoot struct {
|
||||
Tags []Tag `json:"tags"`
|
||||
Links []*LinkAction `json:"links"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
||||
|
@ -139,9 +138,6 @@ func (s *TagsServiceOp) List(ctx context.Context, opt *ListOptions) ([]Tag, *Res
|
|||
if err != nil {
|
||||
return nil, resp, err
|
||||
}
|
||||
if l := root.Links; l != nil {
|
||||
resp.Links = l
|
||||
}
|
||||
if m := root.Meta; m != nil {
|
||||
resp.Meta = m
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue