Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to compare 2 folders #1

Open
omegascorp opened this issue May 2, 2019 · 0 comments
Open

Ability to compare 2 folders #1

omegascorp opened this issue May 2, 2019 · 0 comments

Comments

@omegascorp
Copy link
Member

Go Folder Compare lib should be able to do a shallow compare of 2 folders.

Structs:
FolderSnapshot - should keep a snapshot of a folder

Functions:

// Creates folder snapshot using folder path
func CreateSnapshot(folderPath string) *FolderSnapshot
// Shows diff between 2 folders as a floating point number between 0 and 1, 0 - no diff, 1 - compleatly different
func CompareSnapshots(firstFolder, secondFolder) float32

Code example:

var firstSnapshot *FolderSnapshot
var secondSnapshot *FolderSnapshot
firstSnapshot = folderCompare.CreateSnapshot("src/something")
secondSnapshot = folderCompare.CreateSnapshot("src/something/else")
folderCompare.CompareSnapshots(firstFolder * FolderSnapshot, secondFolder * FolderSnapshots)

Coding style requirement: Fast assignment construction (:=) should not be used.

During project design, we should keep in mind that in the future it should be able to compare with multiple folders and find the best match.

@omegascorp omegascorp added this to Todo in Folder Compare May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant