Skip to content

Commit

Permalink
Use golang code standards for import blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly Norton committed Jun 23, 2015
1 parent 9914be7 commit 4a4393f
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 23 deletions.
7 changes: 4 additions & 3 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/etsy/hound/config"
"github.com/etsy/hound/index"
"github.com/etsy/hound/searcher"
"log"
"net/http"
"strconv"
"strings"
"time"

"github.com/etsy/hound/config"
"github.com/etsy/hound/index"
"github.com/etsy/hound/searcher"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions client/ack.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package client
import (
"bytes"
"fmt"
"github.com/etsy/hound/ansi"
"github.com/etsy/hound/config"
"os"
"regexp"

"github.com/etsy/hound/ansi"
"github.com/etsy/hound/config"
)

type ackPresenter struct {
Expand Down
3 changes: 2 additions & 1 deletion client/coalesce_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package client

import (
"github.com/etsy/hound/index"
"testing"

"github.com/etsy/hound/index"
)

// TODO(knorton):
Expand Down
5 changes: 3 additions & 2 deletions client/grep.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package client

import (
"fmt"
"github.com/etsy/hound/ansi"
"github.com/etsy/hound/config"
"os"
"regexp"

"github.com/etsy/hound/ansi"
"github.com/etsy/hound/config"
)

type grepPresenter struct {
Expand Down
5 changes: 3 additions & 2 deletions cmds/hound/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package main
import (
"encoding/json"
"flag"
"github.com/etsy/hound/client"
"github.com/etsy/hound/index"
"log"
"os"
"os/user"
"regexp"

"github.com/etsy/hound/client"
"github.com/etsy/hound/index"
)

// A uninitialized variable that can be defined during the build process with
Expand Down
9 changes: 5 additions & 4 deletions cmds/houndd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package main
import (
"encoding/json"
"flag"
"github.com/etsy/hound/api"
"github.com/etsy/hound/config"
"github.com/etsy/hound/searcher"
"github.com/etsy/hound/ui"
"log"
"net/http"
"os"
"runtime"
"strings"

"github.com/etsy/hound/api"
"github.com/etsy/hound/config"
"github.com/etsy/hound/searcher"
"github.com/etsy/hound/ui"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package config

import (
"github.com/etsy/hound/vcs"
"path/filepath"
"runtime"
"testing"

"github.com/etsy/hound/vcs"
)

const exampleConfigFile = "config-example.json"
Expand Down
3 changes: 2 additions & 1 deletion index/grep.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package index
import (
"bytes"
"compress/gzip"
"github.com/etsy/hound/codesearch/regexp"
"io"
"os"

"github.com/etsy/hound/codesearch/regexp"
)

var nl = []byte{'\n'}
Expand Down
3 changes: 2 additions & 1 deletion index/grep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package index
import (
"bytes"
"fmt"
"github.com/etsy/hound/codesearch/regexp"
"strings"
"testing"

"github.com/etsy/hound/codesearch/regexp"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions index/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (
"encoding/gob"
"encoding/json"
"fmt"
"github.com/etsy/hound/codesearch/index"
"github.com/etsy/hound/codesearch/regexp"
"io"
"os"
"path/filepath"
"sync"
"time"
"unicode/utf8"

"github.com/etsy/hound/codesearch/index"
"github.com/etsy/hound/codesearch/regexp"
)

const (
Expand Down
7 changes: 4 additions & 3 deletions searcher/searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import (
"crypto/sha1"
"encoding/hex"
"fmt"
"github.com/etsy/hound/config"
"github.com/etsy/hound/index"
"github.com/etsy/hound/vcs"
"io/ioutil"
"log"
"math/rand"
Expand All @@ -16,6 +13,10 @@ import (
"strings"
"sync"
"time"

"github.com/etsy/hound/config"
"github.com/etsy/hound/index"
"github.com/etsy/hound/vcs"
)

type Searcher struct {
Expand Down
3 changes: 2 additions & 1 deletion ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package ui
import (
"bytes"
"fmt"
"github.com/etsy/hound/config"
"html/template"
"io"
"log"
"net/http"
"path/filepath"
"runtime"

"github.com/etsy/hound/config"
)

// An http.Handler for the dev-mode case.
Expand Down

0 comments on commit 4a4393f

Please sign in to comment.