Fix linting errors and remove useless code

This commit is contained in:
Alan Christopher Thomas 2019-09-10 22:56:19 -06:00 committed by Mariano Cano
parent 4dc2410134
commit 624dd0bb9d

View file

@ -225,6 +225,10 @@ intermediate private key.`,
// TODO actually initialize the CA config and start listening
// TODO get the root cert fingerprint to post back to the onboarding guide
payload, err := json.Marshal(onboardingPayload{Fingerprint: "foobarbatbaz"})
if err != nil {
log.Fatal(err)
}
req, err := http.NewRequest("POST", "http://localhost:3002/onboarding/"+token, bytes.NewBuffer(payload))
req.Header.Set("Content-Type", "application/json")
if err != nil {
@ -236,18 +240,13 @@ intermediate private key.`,
if err != nil {
log.Fatal(err)
}
body, err = ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
resp.Body.Close()
fmt.Printf("Initialized!\n")
fmt.Printf("Step CA has been started. Please return to the onboarding guide in your browser to continue.\n")
for {
time.Sleep(1 * time.Second);
time.Sleep(1 * time.Second)
}
return nil
},
},
{