INNER CODE UNIT · Go

TestTrimLeadingComment

kubernetes/kubeadm · kinder/hack/verify-boilerplate_test.go:73

func TestTrimLeadingComment(t *testing.T) {
	testcases := []struct {
		name           string
		comment        string
		line           string
		expectedResult string
	}{
		{
			name:           "trim leading comment",
			comment:        "#",
			line:           "# test",
			expectedResult: "test",
		},
		{
			name:           "empty line",
			comment:        "#",
			line:           "#",
			expectedResult: "",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…