Skip to content

Conversation

fatmcgav
Copy link
Contributor

@fatmcgav fatmcgav commented Feb 9, 2018

New 'debug' param on NewSession and NewTokenSession funcs.

New 'debug' param on NewSession and NewTokenSession funcs.
@scottdware
Copy link
Owner

Before this one gets merged, can you update the example file (examples\go-bigip_example.go) with the necessary changes? That is what's failing the check(s). Thank you!

@fatmcgav
Copy link
Contributor Author

fatmcgav commented Feb 9, 2018

Will do...

Copy link

@kenmaglio kenmaglio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding the debug parameter to the NewSession and NewTokenSession as this would be a breaking change, can we add documentation around the fact that once you get the object back from those two functions.. you can simply set your object's Debug property to true and the included functions will work the same. I'd just hate to see this break everyone's existing code upon a pull request. ( I WISH GO HAD OPTIONAL PARAMETERS!!!! >.< )

So we'd end up doing something like this instead

	// Connect to the BIG-IP system.
	f5 := bigip.NewSession("ltm.company.com", "admin", "secret", nil)

        // Turn on Debug
        f5.Debug = true

 	// Get a list of all VLAN's, and print their names to the console.
	vlans, err := f5.Vlans()
 	if err != nil {
 		fmt.Println(err)
 	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants