mirror of
https://github.com/rancher/k3k.git
synced 2026-08-18 20:07:06 +00:00
@@ -77,7 +77,10 @@ func requestBootstrap(token, serverIP string) (*ControlRuntimeBootstrap, error)
|
||||
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
defer func() {
|
||||
_ = resp.Body.Close()
|
||||
}()
|
||||
|
||||
var runtimeBootstrap ControlRuntimeBootstrap
|
||||
if err := json.NewDecoder(resp.Body).Decode(&runtimeBootstrap); err != nil {
|
||||
@@ -174,6 +177,7 @@ func GetFromSecret(ctx context.Context, client client.Client, cluster *v1alpha1.
|
||||
}
|
||||
|
||||
var bootstrap ControlRuntimeBootstrap
|
||||
|
||||
err := json.Unmarshal(bootstrapData, &bootstrap)
|
||||
|
||||
return &bootstrap, err
|
||||
|
||||
Reference in New Issue
Block a user