Skip to content

Commit

Permalink
Typo fix and readibility improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
gowthamgts committed Nov 17, 2018
1 parent bb91b53 commit 3cdc462
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions base16.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ func hexEncodeToStringUpper(src []byte) string {
return string(dst)
}

var hextableUpper = [16]byte{
var hexTableUppers = [16]byte{
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F',
}

func hexEncodeUpper(dst, src []byte) int {
for i, v := range src {
dst[i*2] = hextableUpper[v>>4]
dst[i*2+1] = hextableUpper[v&0x0f]
dst[i*2] = hexTableUppers[v>>4]
dst[i*2+1] = hexTableUppers[v&0x0f]
}

return len(src) * 2
Expand Down
4 changes: 2 additions & 2 deletions multibase-conv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ func main() {
}

var newBase multibase.Encoding
if baseParm := os.Args[1]; len(baseParm) != 0 {
newBase = multibase.Encoding(baseParm[0])
if baseParam := os.Args[1]; len(baseParam) != 0 {
newBase = multibase.Encoding(baseParam[0])
} else {
fmt.Fprintln(os.Stderr, "<new-base> is empty")
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion multibase.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const (
Base64urlPad = 'U'
)

// Encodigs is a map of the supported encoding, unsupported encoding
// Encodings is a map of the supported encoding, unsupported encoding
// specified in standard are left out
var Encodings = map[string]Encoding{
"identity": 0x00,
Expand Down

0 comments on commit 3cdc462

Please sign in to comment.