Skip to content

Commit

Permalink
switch to Go Modules
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Feb 12, 2019
1 parent fe5a472 commit 0e9eb4e
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 215 deletions.
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
language: go

cache:
directories:
- "vendor"

go:
- "1.10"
- "1.11"
- "1.11.4"

script:
- make dep
- make build
- make lint
162 changes: 0 additions & 162 deletions Gopkg.lock

This file was deleted.

27 changes: 0 additions & 27 deletions Gopkg.toml

This file was deleted.

21 changes: 5 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
PKG := github.com/michael1011/lightningtip

GOBUILD := go build -v
GOINSTALL := go install -v
GOBUILD := GO111MODULE=on go build -v
GOINSTALL := GO111MODULE=on go install -v

GO_BIN := ${GOPATH}/bin
DEP_BIN := $(GO_BIN)/dep
LINT_BIN := $(GO_BIN)/gometalinter.v2

HAVE_DEP := $(shell command -v $(DEP_BIN) 2> /dev/null)
HAVE_LINTER := $(shell command -v $(LINT_BIN) 2> /dev/null)

default: dep build
default: build

$(LINT_BIN):
@$(call print, "Fetching gometalinter.v2")
go get -u gopkg.in/alecthomas/gometalinter.v2

$(DEP_BIN):
@$(call print, "Fetching dep")
go get -u github.com/golang/dep/cmd/dep

GREEN := "\\033[0;32m"
NC := "\\033[0m"

Expand All @@ -39,12 +33,6 @@ LINT = $(LINT_BIN) \
grep -v 'ALL_CAPS\|OP_' 2>&1 | \
tee /dev/stderr

# Dependencies

dep: $(DEP_BIN)
@$(call print, "Compiling dependencies")
dep ensure -v

# Building

build:
Expand All @@ -65,5 +53,6 @@ fmt:

lint: $(LINT_BIN)
@$(call print, "Linting source")
$(LINT_BIN) --install 1> /dev/null
GO111MODULE=on go mod vendor
GO111MODULE=off $(LINT_BIN) --install 1> /dev/null
test -z "$$($(LINT))"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# LightningTip

A simple way to accept tips via the Lightning Network on your website. If want to tip me you can find my instance of LightningTip [here](https://michael1011.at/lightning.html).

[robclark56](https://github.com/robclark56) forked LightningTip and rewrote the backend in **PHP**. His fork is called [LightningTip-PHP](https://github.com/robclark56/lightningtip) and is a great alternative if you are not able to run the executable.
Expand Down Expand Up @@ -33,9 +34,9 @@ That's it! The only two things you need to take care about is keeping the LND no

## How to build

First of all make sure [Golang](https://golang.org/) and [Dep](https://github.com/golang/dep) are both correctly installed. Golang version 1.10 or newer is recommended.
First of all make sure [Golang](https://golang.org/) version 1.11 or newer is correctly installed.

```
```bash
go get -d github.com/michael1011/lightningtip
cd $GOPATH/src/github.com/michael1011/lightningtip

Expand All @@ -48,7 +49,7 @@ To start run `$GOPATH/bin/lightningtip` or follow the instructions below to setu

Make sure you stop any running LightningTip process before upgrading, then pull from source as follows:

```
```bash
cd $GOPATH/src/github.com/michael1011/lightningtip
git pull

Expand Down
17 changes: 17 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module github.com/michael1011/lightningtip

require (
github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b
github.com/golang/protobuf v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v0.0.0-20170724004829-f2862b476edc // indirect
github.com/jessevdk/go-flags v1.4.0
github.com/lightningnetwork/lnd v0.0.0-20180827212353-73af09a06ae9
github.com/mattn/go-sqlite3 v1.9.0
github.com/op/go-logging v0.0.0-20160211212156-b2cb9fa56473
github.com/urfave/cli v1.20.0
golang.org/x/net v0.0.0-20180311174755-ae89d30ce0c6 // indirect
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
golang.org/x/text v0.3.0 // indirect
google.golang.org/genproto v0.0.0-20180306020942-df60624c1e9b // indirect
google.golang.org/grpc v1.5.2
)
26 changes: 26 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b h1:eR1P/A4QMYF2/LpHRhYAts9wyYEtF7qNk/tVNiYCWc8=
github.com/donovanhide/eventsource v0.0.0-20171031113327-3ed64d21fb0b/go.mod h1:56wL82FO0bfMU5RvfXoIwSOP2ggqqxT+tAfNEIyxuHw=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/grpc-ecosystem/grpc-gateway v0.0.0-20170724004829-f2862b476edc h1:3NXdOHZ1YlN6SGP3FPbn4k73O2MeEp065abehRwGFxI=
github.com/grpc-ecosystem/grpc-gateway v0.0.0-20170724004829-f2862b476edc/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/lightningnetwork/lnd v0.0.0-20180827212353-73af09a06ae9 h1:6MKdvuQgZ4UOVJ1h9xeASz8oSUySybblkgjQq4Ebu+w=
github.com/lightningnetwork/lnd v0.0.0-20180827212353-73af09a06ae9/go.mod h1:wpCSmoRQxoM/vXLtTETeBp08XnB/9/f+sjPvCJZPyA0=
github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4=
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/op/go-logging v0.0.0-20160211212156-b2cb9fa56473 h1:J1QZwDXgZ4dJD2s19iqR9+U00OWM2kDzbf1O/fmvCWg=
github.com/op/go-logging v0.0.0-20160211212156-b2cb9fa56473/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
golang.org/x/net v0.0.0-20180311174755-ae89d30ce0c6 h1:VNwI0l6D6+cM79+3XBbvypTLyFJtQP1GEgUNsEadLdY=
golang.org/x/net v0.0.0-20180311174755-ae89d30ce0c6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/genproto v0.0.0-20180306020942-df60624c1e9b h1:XeiFoG4FHSBJUL3qKCkMrkwBFRXB+hyQiTPg82JUssI=
google.golang.org/genproto v0.0.0-20180306020942-df60624c1e9b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.5.2 h1:b6oAqMSH36Omv3KU5KuN6qB2jaJClahvIWSmfQtfyFw=
google.golang.org/grpc v1.5.2/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=

0 comments on commit 0e9eb4e

Please sign in to comment.