Skip to content

Commit

Permalink
lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhadfield committed Jun 24, 2020
1 parent da75b50 commit a4310af
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 23 deletions.
7 changes: 4 additions & 3 deletions cmd/sncli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/jonhadfield/gosn-v2/cache"
"os"
"sort"
"strconv"
"strings"
"syscall"
"time"

gosn "github.com/jonhadfield/gosn-v2"
"github.com/jonhadfield/gosn-v2/cache"
yaml "gopkg.in/yaml.v2"

sncli "github.com/jonhadfield/sn-cli"
"gopkg.in/yaml.v2"

"github.com/jonhadfield/gosn-v2"
"github.com/spf13/viper"
"github.com/urfave/cli"
"golang.org/x/crypto/ssh/terminal"
Expand Down
9 changes: 5 additions & 4 deletions cmd/sncli/note.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"encoding/json"
"errors"
"fmt"
"strconv"
"strings"

"github.com/divan/num2words"
"github.com/jonhadfield/gosn-v2"
gosn "github.com/jonhadfield/gosn-v2"
"github.com/jonhadfield/gosn-v2/cache"
sncli "github.com/jonhadfield/sn-cli"
"github.com/urfave/cli"
"gopkg.in/yaml.v3"
"strconv"
"strings"
yaml "gopkg.in/yaml.v2"
)

func processGetNotes(c *cli.Context, opts configOptsOutput) (msg string, err error) {
Expand Down
5 changes: 3 additions & 2 deletions cmd/sncli/session.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"github.com/jonhadfield/gosn-v2"
"github.com/urfave/cli"
"os"

gosn "github.com/jonhadfield/gosn-v2"
"github.com/urfave/cli"
)

func processSession(c *cli.Context, opts configOptsOutput) (msg string, err error) {
Expand Down
9 changes: 5 additions & 4 deletions cmd/sncli/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/jonhadfield/gosn-v2"
"strconv"
"strings"

gosn "github.com/jonhadfield/gosn-v2"
"github.com/jonhadfield/gosn-v2/cache"
sncli "github.com/jonhadfield/sn-cli"
"github.com/urfave/cli"
"gopkg.in/yaml.v3"
"strconv"
"strings"
yaml "gopkg.in/yaml.v2"
)

func processGetTags(c *cli.Context, opts configOptsOutput) (msg string, err error) {
Expand Down
5 changes: 1 addition & 4 deletions export.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@ func (i *ImportConfig) Run() error {

var encFinalList gosn.EncryptedItems

// only items with uuids that don't yet exist will be imported
for _, itemToImport := range encItemsToImport {
encFinalList = append(encFinalList, itemToImport)
}
encFinalList = append(encFinalList, encItemsToImport...)

if len(encFinalList) == 0 {
return fmt.Errorf("no items to import were loaded")
Expand Down
5 changes: 3 additions & 2 deletions note_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package sncli

import (
"fmt"
"github.com/jonhadfield/gosn-v2/cache"
"os"
"testing"

"github.com/jonhadfield/gosn-v2"
gosn "github.com/jonhadfield/gosn-v2"
"github.com/jonhadfield/gosn-v2/cache"

"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (input *AddTagsInput) Run() (output AddTagsOutput, err error) {
return
}

return
return output, err
}

func (input *GetTagConfig) Run() (items gosn.Items, err error) {
Expand Down Expand Up @@ -250,7 +250,7 @@ func (input *GetTagConfig) Run() (items gosn.Items, err error) {

items.Filter(input.Filters)

return
return items, err
}

func (input *DeleteTagConfig) Run() (noDeleted int, err error) {
Expand Down
5 changes: 3 additions & 2 deletions tag_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package sncli

import (
"github.com/jonhadfield/gosn-v2"
"testing"

gosn "github.com/jonhadfield/gosn-v2"
"github.com/jonhadfield/gosn-v2/cache"
"github.com/stretchr/testify/assert"
"testing"
)

func TestAddDeleteTagByTitle(t *testing.T) {
Expand Down

0 comments on commit a4310af

Please sign in to comment.