Skip to content

Commit

Permalink
Update project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbruinsslot committed Oct 19, 2016
1 parent 319029c commit 10e4469
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
src/vendor/*
bin/
vendor/*
!vendor.json
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,29 @@ test:
# `./bin/slack-term`
# Placement of the binary
#
# `./src/`
# `.`
# Location of the source files
build:
@ echo "+ $@"
@ CGO_ENABLED=0 go build -a -installsuffix cgo -o ./bin/slack-term ./src/
@ CGO_ENABLED=0 go build -a -installsuffix cgo -o ./bin/slack-term .

# Cross-compile
# http://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5
build-linux:
@ echo "+ $@"
@ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o ./bin/slack-term-linux-amd64 ./src/
@ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o ./bin/slack-term-linux-amd64 .

build-mac:
@ echo "+ $@"
@ GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o ./bin/slack-term-darwin-amd64 ./src/
@ GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o ./bin/slack-term-darwin-amd64 .

run: build
@ echo "+ $@"
@ ./bin/slack-term

install: build
@ echo "+ $@"
@ cp ./bin/slack-term ~/bin
@ go install .

build-all: build build-linux build-mac

Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Getting started
compatible version for your system, and place where you can access it from
the command line like, `~/bin`, `/usr/local/bin`, or `/usr/local/sbin`.

For the latest version, click [here](https://github.com/erroneousboat/slack-term/tree/master/bin)

2. Get a slack token, click [here](https://api.slack.com/docs/oauth-test-tokens)

3. Create a `slack-term.json` file, place it in your home directory. The file
Expand Down
2 changes: 1 addition & 1 deletion src/components/channels.go → components/channels.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/gizak/termui"

"github.com/erroneousboat/slack-term/src/service"
"github.com/erroneousboat/slack-term/service"
)

// Channels is the definition of a Channels component
Expand Down
2 changes: 1 addition & 1 deletion src/components/chat.go → components/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/gizak/termui"

"github.com/erroneousboat/slack-term/src/service"
"github.com/erroneousboat/slack-term/service"
)

// Chat is the definition of a Chat component
Expand Down
2 changes: 1 addition & 1 deletion src/components/input.go → components/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package components
import (
"github.com/gizak/termui"

"github.com/erroneousboat/slack-term/src/service"
"github.com/erroneousboat/slack-term/service"
)

// Input is the definition of an Input component
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/context/context.go → context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (

"github.com/gizak/termui"

"github.com/erroneousboat/slack-term/src/config"
"github.com/erroneousboat/slack-term/src/service"
"github.com/erroneousboat/slack-term/src/views"
"github.com/erroneousboat/slack-term/config"
"github.com/erroneousboat/slack-term/service"
"github.com/erroneousboat/slack-term/views"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions src/handlers/event.go → handlers/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"github.com/nlopes/slack"
termbox "github.com/nsf/termbox-go"

"github.com/erroneousboat/slack-term/src/context"
"github.com/erroneousboat/slack-term/src/views"
"github.com/erroneousboat/slack-term/context"
"github.com/erroneousboat/slack-term/views"
)

func RegisterEventHandlers(ctx *context.AppContext) {
Expand Down
4 changes: 2 additions & 2 deletions src/main.go → main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os/user"
"path"

"github.com/erroneousboat/slack-term/src/context"
"github.com/erroneousboat/slack-term/src/handlers"
"github.com/erroneousboat/slack-term/context"
"github.com/erroneousboat/slack-term/handlers"

"github.com/gizak/termui"
)
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/views/chat.go → views/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package views
import (
"github.com/gizak/termui"

"github.com/erroneousboat/slack-term/src/components"
"github.com/erroneousboat/slack-term/src/service"
"github.com/erroneousboat/slack-term/components"
"github.com/erroneousboat/slack-term/service"
)

type View struct {
Expand Down

0 comments on commit 10e4469

Please sign in to comment.