@@ -51,13 +51,13 @@ runcmd:
5151{{- template "mounts" .Mounts}}
5252`
5353
54- // Common MIME header and boundary template
54+ // Common MIME header and boundary template.
5555 mimeHeaderTemplate = `MIME-Version: 1.0
5656Content-Type: multipart/mixed; boundary="{{.Boundary}}"
5757
5858`
5959
60- // Shell script part template for AL2023
60+ // Shell script part template for AL2023.
6161 shellScriptPartTemplate = `--{{.Boundary}}
6262Content-Type: text/x-shellscript; charset="us-ascii"
6363
@@ -75,7 +75,7 @@ set -o nounset
7575{{- end}}
7676{{- end}}`
7777
78- // Node config part template for AL2023
78+ // Node config part template for AL2023.
7979 nodeConfigPartTemplate = `
8080--{{.Boundary}}
8181Content-Type: application/node.eks.aws
@@ -339,7 +339,7 @@ func generateAL2023UserData(input *NodeInput) ([]byte, error) {
339339 var buf bytes.Buffer
340340
341341 // 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 {
343343 return nil , fmt .Errorf ("failed to write MIME header: %v" , err )
344344 }
345345
@@ -363,7 +363,7 @@ func generateAL2023UserData(input *NodeInput) ([]byte, error) {
363363 return buf .Bytes (), nil
364364}
365365
366- // getCapacityTypeString returns the string representation of the capacity type
366+ // getCapacityTypeString returns the string representation of the capacity type.
367367func (ni * NodeInput ) getCapacityTypeString () string {
368368 if ni .CapacityType == nil {
369369 return "ON_DEMAND"
@@ -378,7 +378,7 @@ func (ni *NodeInput) getCapacityTypeString() string {
378378 }
379379}
380380
381- // validateAL2023Input validates the input for AL2023 user data generation
381+ // validateAL2023Input validates the input for AL2023 user data generation.
382382func validateAL2023Input (input * NodeInput ) error {
383383 if input .APIServerEndpoint == "" {
384384 return fmt .Errorf ("API server endpoint is required for AL2023" )
0 commit comments