-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sync): allow continue sync when code conflict (#6)
- Loading branch information
Showing
7 changed files
with
499 additions
and
91 deletions.
There are no files selected for viewing
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,19 @@ | ||
package dx | ||
|
||
import "encoding/base32" | ||
|
||
var b32encoding *base32.Encoding | ||
|
||
func init() { | ||
b32encoding = base32.NewEncoding("abcdefghijklmnopqrstuvwxyz234567"). | ||
WithPadding(base32.NoPadding) | ||
} | ||
|
||
func b32en(name string) string { | ||
return b32encoding.EncodeToString([]byte(name)) | ||
} | ||
|
||
func b32de(encode string) (string, error) { | ||
b, err := b32encoding.DecodeString(encode) | ||
return string(b), err | ||
} |
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
Oops, something went wrong.