-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(monad): Remove polymorphic monads * refactor(vcs): Shorten names
- Loading branch information
Showing
10 changed files
with
93 additions
and
170 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package files_test | ||
|
||
import ( | ||
"path/filepath" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
|
||
"github.com/fossas/fossa-cli/files" | ||
) | ||
|
||
func TestNonExistentParentIsNotErr(t *testing.T) { | ||
ok, err := files.Exists(filepath.Join("testdata", "parent", "does", "not", "exist", "file")) | ||
assert.NoError(t, err) | ||
assert.False(t, ok) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package vcs | ||
|
||
// VCS represents a type of version control system. | ||
type VCS int | ||
|
||
const ( | ||
_ VCS = iota | ||
Subversion | ||
Git | ||
Mercurial | ||
Bazaar | ||
) | ||
|
||
var Types = [4]VCS{ | ||
Subversion, | ||
Git, | ||
Mercurial, | ||
Bazaar, | ||
} | ||
|
||
func MetadataFolder(vcs VCS) string { | ||
switch vcs { | ||
case Subversion: | ||
return ".svn" | ||
case Git: | ||
return ".git" | ||
case Mercurial: | ||
return ".hg" | ||
case Bazaar: | ||
return ".bzr" | ||
default: | ||
return "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters