Skip to content

Commit 41ff62d

Browse files
committed
Try to fix go tests
1 parent a826c3f commit 41ff62d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/test/src/go.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,9 @@ impl LanguageMethods for Go {
115115

116116
fn package_name(package: &str) -> &str {
117117
package
118-
.split_once('\n')
119-
.unwrap()
120-
.0
121-
.strip_prefix("package ")
118+
.lines()
119+
.filter_map(|l| l.strip_prefix("package "))
120+
.next()
122121
.unwrap()
123122
.trim()
124123
}

0 commit comments

Comments
 (0)