From 8043db020cda06e77ebdc6324325df3b4ef62e04 Mon Sep 17 00:00:00 2001 From: Blagoj Atanasovski Date: Wed, 18 Sep 2019 11:15:30 +0200 Subject: [PATCH] Update readme to reflect go mod usage --- .travis.yml | 2 ++ README.md | 24 ++++++++++++------- cmd/outflux/main.go | 2 +- .../schemamanagement/ts/ts_schema_manager.go | 4 ++-- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 55b840d..dbfc81a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,9 @@ language: go go: + - 1.11.x - 1.12.x + - 1.13.x services: - docker install: true diff --git a/README.md b/README.md index cce16e9..dbf0ba8 100644 --- a/README.md +++ b/README.md @@ -24,19 +24,25 @@ This repo contains code for exporting complete InfluxDB databases or selected me ### Installing from source -Outflux is a Go project managed by `dep` (The go dependency management tool). To download the proper dependency versions, `dep` must be installed on your system. Instructions can be found on the [official documentation page](https://golang.github.io/dep/docs/installation.html). +Outflux is a Go project managed by `go modules`. You can download it +in any directory and on the first build it will download it's required dependencies. + +Depending on where you downloaded it and the go version you're using, you may + need to set the `GO111MODULE` to `auto`, `on` or `off`. Learn about the `GO111MODULE` + environment variable [here](https://golang.org/cmd/go/#hdr-Module_support). ```bash -# Fetch the source code of Outflux -$ go get github.com/timescale/outflux -$ cd $GOPATH/src/github.com/timescale/outflux +# Fetch the source code of Outflux in any directory +$ git clone git@github.com:timescale/outflux.git +$ cd ./outflux -# Fetch the required dependencies -$ dep ensure -v +# Install the Outflux binary (will automaticly detect and download) +# dependencies. +$ cd cmd/outflux +$ GO111MODULE=auto go install -# Install the Outflux binary: -$ cd cmd/outlux -$ go install +# Building without installing will also fetch the required dependencies +$ GO111MODULE=auto go build ./... ``` ### Binary releases diff --git a/cmd/outflux/main.go b/cmd/outflux/main.go index c2fb576..2541c5c 100644 --- a/cmd/outflux/main.go +++ b/cmd/outflux/main.go @@ -1,6 +1,6 @@ package main -const outfluxVersion = "0.2.0" +const outfluxVersion = "0.2.0-dev" func main() { RootCmd.Execute() diff --git a/internal/schemamanagement/ts/ts_schema_manager.go b/internal/schemamanagement/ts/ts_schema_manager.go index 5f67eda..ec0b69f 100644 --- a/internal/schemamanagement/ts/ts_schema_manager.go +++ b/internal/schemamanagement/ts/ts_schema_manager.go @@ -190,7 +190,7 @@ func (sm *TSSchemaManager) updateMetadata() { err = sm.creator.UpdateMetadata(sm.dbConn, metadataTableName) if err != nil { - log.Println("could not update TimescaleDB metadata") - log.Println("reason:" + err.Error()) + log.Println("WARN: could not update TimescaleDB metadata") + log.Println("WARN: reason:" + err.Error()) } }