Skip to content

Commit

Permalink
lower-case github handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Balazs Nadasdi committed May 10, 2018
1 parent 321662f commit 1e3efdc
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/Yitsushi/totp-cli)](https://goreportcard.com/report/github.com/Yitsushi/totp-cli)
[![Build Status](https://travis-ci.org/Yitsushi/totp-cli.svg?branch=master)](https://travis-ci.org/Yitsushi/totp-cli)
[![Go Report Card](https://goreportcard.com/badge/github.com/yitsushi/totp-cli)](https://goreportcard.com/report/github.com/yitsushi/totp-cli)
[![Build Status](https://travis-ci.org/yitsushi/totp-cli.svg?branch=master)](https://travis-ci.org/yitsushi/totp-cli)

This is a simple TOTP _(Time-based One-time Password)_ CLI tool.
TOTP is the most common mechanism for 2FA _(Two-Factor-Authentication)_.
Expand All @@ -9,7 +9,7 @@ and protect your data with a password.
### Install

Download the latest version of the application
from the [releases page](https://github.com/Yitsushi/totp-cli/releases/latest).
from the [releases page](https://github.com/yitsushi/totp-cli/releases/latest).

### Update

Expand Down
6 changes: 3 additions & 3 deletions command/add_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package command
import (
"fmt"

"github.com/Yitsushi/go-commander"
s "github.com/Yitsushi/totp-cli/storage"
"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/go-commander"
s "github.com/yitsushi/totp-cli/storage"
"github.com/yitsushi/totp-cli/util"
)

// AddToken structure is the representation of the add-token command
Expand Down
6 changes: 3 additions & 3 deletions command/change_password.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package command

import (
"github.com/Yitsushi/go-commander"
s "github.com/Yitsushi/totp-cli/storage"
"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/go-commander"
s "github.com/yitsushi/totp-cli/storage"
"github.com/yitsushi/totp-cli/util"
)

// ChangePassword structure is the representation of the change-password command
Expand Down
6 changes: 3 additions & 3 deletions command/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strings"

"github.com/Yitsushi/go-commander"
s "github.com/Yitsushi/totp-cli/storage"
"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/go-commander"
s "github.com/yitsushi/totp-cli/storage"
"github.com/yitsushi/totp-cli/util"
)

// Delete structure is the representation of the delete command
Expand Down
8 changes: 4 additions & 4 deletions command/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"strings"
"time"

"github.com/Yitsushi/go-commander"
"github.com/Yitsushi/totp-cli/security"
s "github.com/Yitsushi/totp-cli/storage"
"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/go-commander"
"github.com/yitsushi/totp-cli/security"
s "github.com/yitsushi/totp-cli/storage"
"github.com/yitsushi/totp-cli/util"
)

// Generate structure is the representation of the generate command
Expand Down
6 changes: 3 additions & 3 deletions command/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package command
import (
"fmt"

"github.com/Yitsushi/go-commander"
s "github.com/Yitsushi/totp-cli/storage"
"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/go-commander"
s "github.com/yitsushi/totp-cli/storage"
"github.com/yitsushi/totp-cli/util"
)

// List structure is the representation of the list command
Expand Down
8 changes: 4 additions & 4 deletions command/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"os"
"runtime"

grc "github.com/Yitsushi/github-release-check"
"github.com/Yitsushi/go-commander"
"github.com/kardianos/osext"
grc "github.com/yitsushi/github-release-check"
"github.com/yitsushi/go-commander"

"github.com/Yitsushi/totp-cli/info"
"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/totp-cli/info"
"github.com/yitsushi/totp-cli/util"
)

// Update structure is the representation of the update command
Expand Down
4 changes: 2 additions & 2 deletions command/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"runtime"

"github.com/Yitsushi/go-commander"
"github.com/Yitsushi/totp-cli/info"
"github.com/yitsushi/go-commander"
"github.com/yitsushi/totp-cli/info"
)

// Version structure is the representation of the Version command
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/Yitsushi/go-commander"
"github.com/Yitsushi/totp-cli/command"
"github.com/yitsushi/go-commander"
"github.com/yitsushi/totp-cli/command"
)

func registerCommands(registry *commander.CommandRegistry) {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"testing"

"github.com/Yitsushi/go-commander"
"github.com/stretchr/testify/assert"
"github.com/yitsushi/go-commander"
)

func TestRegisterCommands(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion security/otp.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/totp-cli/util"
)

// GenerateOTPCode generates a 6 digit TOTP from the secret Token
Expand Down
2 changes: 1 addition & 1 deletion storage/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (n *Namespace) FindAccount(name string) (account *Account, err error) {
}
}
account = &Account{}
err = errors.New("Account not found.")
err = errors.New("Account not found")

return
}
Expand Down
4 changes: 2 additions & 2 deletions storage/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestFindAccount_NotFound(t *testing.T) {

account, err := namespace.FindAccount("AccountNotFound")

assert.EqualError(t, err, "Account not found.", "Error should be 'Account not found.'")
assert.EqualError(t, err, "Account not found", "Error should be 'Account not found'")
assert.Equal(t, account, &Account{}, "Account should be nil")
}

Expand All @@ -58,7 +58,7 @@ func TestDeleteAccount(t *testing.T) {
namespace.DeleteAccount(account)
assert.Equal(t, len(namespace.Accounts), 2)
account, err = namespace.FindAccount("Account1")
assert.EqualError(t, err, "Account not found.", "Error should be 'Account not found.'")
assert.EqualError(t, err, "Account not found", "Error should be 'Account not found'")
// Delete again :D
namespace.DeleteAccount(account)
assert.Equal(t, len(namespace.Accounts), 2)
Expand Down
4 changes: 2 additions & 2 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"os/user"
"path/filepath"

"github.com/Yitsushi/totp-cli/util"
"github.com/yitsushi/totp-cli/util"
)

// Storage structure represents the credential storage
Expand Down Expand Up @@ -98,7 +98,7 @@ func (s *Storage) FindNamespace(name string) (namespace *Namespace, err error) {
}
}
namespace = &Namespace{}
err = errors.New("Namespace not found.")
err = errors.New("Namespace not found")

return
}
Expand Down
4 changes: 2 additions & 2 deletions storage/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestFindNamespace_NotFound(t *testing.T) {

namespace, err := storage.FindNamespace("NamespaceNotFound")

assert.EqualError(t, err, "Namespace not found.", "Error should be 'Namespace not found.'")
assert.EqualError(t, err, "Namespace not found", "Error should be 'Namespace not found'")
assert.Equal(t, namespace, &Namespace{}, "Namespace should be nil")
}

Expand All @@ -55,7 +55,7 @@ func TestDeleteNamespace(t *testing.T) {
storage.DeleteNamespace(namespace)
assert.Equal(t, len(storage.Namespaces), 2)
namespace, err = storage.FindNamespace("Namespace1")
assert.EqualError(t, err, "Namespace not found.", "Error should be 'Namespace not found.'")
assert.EqualError(t, err, "Namespace not found", "Error should be 'Namespace not found'")
// Delete again :D
storage.DeleteNamespace(namespace)
assert.Equal(t, len(storage.Namespaces), 2)
Expand Down

0 comments on commit 1e3efdc

Please sign in to comment.