Sample env variable access for tc rules
authorVZ Cambria <vzcambria@gmail.com>
Wed, 28 Dec 2016 21:42:33 +0000 (16:42 -0500)
committerVZ Cambria <vzcambria@gmail.com>
Wed, 28 Dec 2016 21:42:33 +0000 (16:42 -0500)
pkg/ipam/ipam.go

index 09b167e..8d3fe05 100644 (file)
@@ -94,6 +94,11 @@ func ConfigureIface(ifName string, res *types.Result) error {
         result = string(cmdOut)
         fmt.Println("The result of show filter is: ", result)
 
+       /*
+        * Example of getting an environment variable supplied to plugin
+        */
+       mccval := os.Getenv("MCCVAL")
+       fmt.Println("mccval is: ", mccval)
 /*
  * End
  */