Skip to content

Commit

Permalink
change AllVirtualNetworkTypes() to return pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Apr 25, 2023
1 parent 6d4a5c4 commit bf3e19a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apstra/two_stage_l3_clos_virtual_networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,16 @@ func (o vnType) parse() (int, error) {

// AllVirtualNetworkTypes returns the []VnType representing
// each supported VnType
func AllVirtualNetworkTypes() []VnType {
func AllVirtualNetworkTypes() []*VnType {
i := 0
var result []VnType
var result []*VnType
for {
var os VnType
err := os.FromString(VnType(i).String())
var vnt VnType
err := vnt.FromString(VnType(i).String())
if err != nil {
return result[:i]
}
result = append(result, os)
result = append(result, &vnt)
i++
}
}
Expand Down

0 comments on commit bf3e19a

Please sign in to comment.