Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed Feb 25, 2024
1 parent e581a4d commit e97a1a8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,19 @@ the file to the storage.
package main

import (
"github.com/mirkobrombin/dabadee"
"github.com/mirkobrombin/dabadee/pkg/dabadee"
"github.com/mirkobrombin/dabadee/pkg/hash"
"github.com/mirkobrombin/dabadee/pkg/processor"
"github.com/mirkobrombin/dabadee/pkg/storage"
)

func main() {
// Deduplicate a folder
err := dabadee.Dedup("/path/to/folder", "/path/to/storage", 2, false)
if err != nil {
panic(err)
}
s := storage.NewStorage("/path/to/storage")
h := hash.NewSHA256Generator()
p := processor.NewDedupProcessor("/path/to/folder", s, h, 2, true)

// Deduplicate a file on copy
err = dabadee.Cp("/path/to/file", "/path/to/dest/file", "/path/to/storage", false)
d := dabadee.NewDaBaDee(p)
err := d.Run()
if err != nil {
panic(err)
}
Expand Down

0 comments on commit e97a1a8

Please sign in to comment.