Created
May 24, 2017 09:26
-
-
Save timmow/73de3f62e4295f55284db2d1136744e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/cloudfoundry-community/go-cfclient" | |
) | |
func main() { | |
client, err := cfclient.NewClient(&cfclient.Config{ | |
ApiAddress: os.Getenv("API"), | |
ClientID: os.Getenv("ClientID"), | |
ClientSecret: os.Getenv("ClientSecret"), | |
}) | |
if err != nil { | |
fmt.Println("didnt work") | |
fmt.Println(err) | |
} else { | |
fmt.Println("connected") | |
} | |
_, err = client.ListApps() | |
if err != nil { | |
fmt.Println("didnt work") | |
fmt.Println(err) | |
} else { | |
fmt.Println("connected") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment