@@ -51,13 +51,13 @@ runcmd:
51
51
{{- template "mounts" .Mounts}}
52
52
`
53
53
54
- // Common MIME header and boundary template
54
+ // Common MIME header and boundary template.
55
55
mimeHeaderTemplate = `MIME-Version: 1.0
56
56
Content-Type: multipart/mixed; boundary="{{.Boundary}}"
57
57
58
58
`
59
59
60
- // Shell script part template for AL2023
60
+ // Shell script part template for AL2023.
61
61
shellScriptPartTemplate = `--{{.Boundary}}
62
62
Content-Type: text/x-shellscript; charset="us-ascii"
63
63
@@ -75,7 +75,7 @@ set -o nounset
75
75
{{- end}}
76
76
{{- end}}`
77
77
78
- // Node config part template for AL2023
78
+ // Node config part template for AL2023.
79
79
nodeConfigPartTemplate = `
80
80
--{{.Boundary}}
81
81
Content-Type: application/node.eks.aws
@@ -339,7 +339,7 @@ func generateAL2023UserData(input *NodeInput) ([]byte, error) {
339
339
var buf bytes.Buffer
340
340
341
341
// Write MIME header
342
- if _ , err := buf .WriteString (fmt .Sprintf ("MIME-Version: 1.0\n Content-Type: multipart/mixed; boundary=\" %s \" \n \n " , input .Boundary )); err != nil {
342
+ if _ , err := buf .WriteString (fmt .Sprintf ("MIME-Version: 1.0\n Content-Type: multipart/mixed; boundary=%q \n \n " , input .Boundary )); err != nil {
343
343
return nil , fmt .Errorf ("failed to write MIME header: %v" , err )
344
344
}
345
345
@@ -363,7 +363,7 @@ func generateAL2023UserData(input *NodeInput) ([]byte, error) {
363
363
return buf .Bytes (), nil
364
364
}
365
365
366
- // getCapacityTypeString returns the string representation of the capacity type
366
+ // getCapacityTypeString returns the string representation of the capacity type.
367
367
func (ni * NodeInput ) getCapacityTypeString () string {
368
368
if ni .CapacityType == nil {
369
369
return "ON_DEMAND"
@@ -378,7 +378,7 @@ func (ni *NodeInput) getCapacityTypeString() string {
378
378
}
379
379
}
380
380
381
- // validateAL2023Input validates the input for AL2023 user data generation
381
+ // validateAL2023Input validates the input for AL2023 user data generation.
382
382
func validateAL2023Input (input * NodeInput ) error {
383
383
if input .APIServerEndpoint == "" {
384
384
return fmt .Errorf ("API server endpoint is required for AL2023" )
0 commit comments