1+ /*
2+ Copyright 2024 The cert-manager Authors.
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ */
16+
117package heuristics
218
319import (
@@ -207,7 +223,7 @@ func TestParseCommentIntoBlocks(t *testing.T) {
207223 Segments : []CommentBlockSegment {
208224 {
209225 Type : ContentTypeText ,
210- Contents : []string {" This is an example single line comment" },
226+ Contents : []string {"This is an example single line comment" },
211227 },
212228 },
213229 },
@@ -228,7 +244,7 @@ func TestParseCommentIntoBlocks(t *testing.T) {
228244 Segments : []CommentBlockSegment {
229245 {
230246 Type : ContentTypeText ,
231- Contents : []string {" This is an example multi-line" , " comment" },
247+ Contents : []string {"This is an example multi-line" , "comment" },
232248 },
233249 },
234250 },
@@ -251,11 +267,11 @@ func TestParseCommentIntoBlocks(t *testing.T) {
251267 Segments : []CommentBlockSegment {
252268 {
253269 Type : ContentTypeText ,
254- Contents : []string {" This is an example multi-line" , " comment followed by some yaml" },
270+ Contents : []string {"This is an example multi-line" , "comment followed by some yaml" },
255271 },
256272 {
257273 Type : ContentTypeYaml ,
258- Contents : []string {" foo:" , " bar: baz" },
274+ Contents : []string {"foo:" , " bar: baz" },
259275 },
260276 },
261277 },
@@ -280,19 +296,19 @@ func TestParseCommentIntoBlocks(t *testing.T) {
280296 Segments : []CommentBlockSegment {
281297 {
282298 Type : ContentTypeText ,
283- Contents : []string {" This is an example multi-line" , " comment followed by some yaml" },
299+ Contents : []string {"This is an example multi-line" , "comment followed by some yaml" },
284300 },
285301 {
286302 Type : ContentTypeYaml ,
287- Contents : []string {" foo:" , " bar: baz" },
303+ Contents : []string {"foo:" , " bar: baz" },
288304 },
289305 },
290306 },
291307 {
292308 Segments : []CommentBlockSegment {
293309 {
294310 Type : ContentTypeText ,
295- Contents : []string {" This is another comment" },
311+ Contents : []string {"This is another comment" },
296312 },
297313 },
298314 },
0 commit comments