golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/suggestedfix/noresultvalues.txt (about) 1 This test checks the quick fix for removing extra return values. 2 3 Note: gopls should really discard unnecessary return statements. 4 5 -- noresultvalues.go -- 6 package typeerrors 7 8 func x() { return nil } //@suggestedfix("nil", re"too many return", x) 9 10 func y() { return nil, "hello" } //@suggestedfix("nil", re"too many return", y) 11 -- @x/noresultvalues.go -- 12 @@ -3 +3 @@ 13 -func x() { return nil } //@suggestedfix("nil", re"too many return", x) 14 +func x() { return } //@suggestedfix("nil", re"too many return", x) 15 -- @y/noresultvalues.go -- 16 @@ -5 +5 @@ 17 -func y() { return nil, "hello" } //@suggestedfix("nil", re"too many return", y) 18 +func y() { return } //@suggestedfix("nil", re"too many return", y)