PrevPrevious commit
Next Next commit
updated test to include an empty list
  • Loading branch information
@hsheikhali1
hsheikhali1 committedMay 11, 2022
commit ea4b50d6a361e8397b65de8f6fcdaff7e6591c46
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"io"
"log"
"os"
"os/exec"
"path/filepath"
Expand DownExpand Up@@ -1124,7 +1125,7 @@ func TestSliceProducesNoElementsWhenProvidedWithAnEmptyList(t *testing.T) {
t.Parallel()

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, but it's house style with this project to use no blank lines within functions. To my mind, they just make the function longer without providing any benefit.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a thing I have built into muscle memory from my typescript work.. I noticed some Go devs prefer not to have a bunch of blank lines

want := ""
got, err := script.ListFiles("../example").String()
got, err := script.Slice([]string{}).String()

if err != nil {
t.Fatal(err)
Expand Down