moving print debug test to top of file

This commit is contained in:
jackspirou 2015-11-20 20:27:36 -06:00
parent 3bf814670c
commit c51804fc5c
1 changed files with 2 additions and 4 deletions

View File

@ -16,6 +16,8 @@ import (
func main() {
fmt.Println(os.Getenv("DEBUG"))
// plugin settings
var repo = drone.Repo{}
var build = drone.Build{}
@ -98,7 +100,6 @@ func main() {
// set basic auth if a user or user and pass is provided
if len(vargs.Auth.Username) > 0 {
fmt.Println("setting basic auth")
if len(vargs.Auth.Password) > 0 {
req.SetBasicAuth(vargs.Auth.Username, vargs.Auth.Password)
} else {
@ -113,9 +114,6 @@ func main() {
}
defer resp.Body.Close()
fmt.Println(vargs.Debug)
fmt.Println(os.Getenv("DEBUG"))
if vargs.Debug || os.Getenv("DEBUG") == "true" {
body, err := ioutil.ReadAll(resp.Body)