Skip to content

Instantly share code, notes, and snippets.

@danvega
Created February 14, 2014 14:20
Show Gist options
  • Save danvega/9001764 to your computer and use it in GitHub Desktop.
Save danvega/9001764 to your computer and use it in GitHub Desktop.
Return multiple values in Groovy
String username = 'dvega'
String password = 'password'
String auth = "$username:$password"
def (user,pass) = auth.split(':')
println "user=$user pass=$pass"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment