261101.4 · 5735ff673a95384397d923bbcec92a411a6328d1
main.go splits by purpose
main.go held argument parsing, endpoint and token resolution and opening a browser, beside the program's start. They move to args.go, endpoint.go and browser.go, and main_test.go's tests go with the code they cover. main.go keeps main, the reporter, detaching and error codes.
Declarations moved unchanged, as a sorted comparison of every line outside the import blocks confirms. git blame -C -C traces them.
reading declarations
Changes to list_test.go. All files
@@ -63,3 +63,22 @@ func TestKvValue(t *testing.T) { } } }++// A tree is within a directory at or above it, never beside it.+func TestWithin(t *testing.T) {+ for _, tc := range []struct {+ dir, root string+ want bool+ }{+ {"/a/b", "/a/b", true},+ {"/a/b/c", "/a", true},+ {"/a/b", "/", true},+ {"/a/bc", "/a/b", false},+ {"/a", "/a/b", false},+ {"/x/..y", "/x", true},+ } {+ if got := within(tc.dir, tc.root); got != tc.want {+ t.Errorf("within(%q, %q) = %v, want %v", tc.dir, tc.root, got, tc.want)+ }+ }+}