Browse Source

Added example of getting recursively of all ids in unit 536

Dmitry Yu Okunev 2 years ago
parent
commit
b7787a9d5f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      main.go

+ 5 - 1
main.go

@@ -26,5 +26,9 @@ func main() {
 	units, err := sdApi1.GetUnits()
 	checkErr(err)
 
-	fmt.Printf("units == %v", units)
+	unitsMap := units.ToMap()
+	unit536 := unitsMap[8000161]
+	unit536recursive := unit536.GetRecursive()
+
+	fmt.Printf("unitIds == %v\n", unit536recursive.GetUnitIds())
 }