From 7cf955ed7fb9e96bb730f3b8910ce8011810bb01 Mon Sep 17 00:00:00 2001 From: Thomas Cyron Date: Sat, 2 May 2020 12:46:39 +0200 Subject: [PATCH] Release version 4 with support for Go modules --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ .travis.yml | 7 ------- CHANGES.md | 4 ++++ LICENSE | 2 +- README.md | 19 +++++++++---------- dialect.go | 4 ++-- go.mod | 3 +++ 7 files changed, 39 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml create mode 100644 go.mod diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4229ba1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI +on: [push] +jobs: + build: + name: CI + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v1 + with: + go-version: "1.14" + - uses: actions/checkout@v1 + - name: Check formatting and imports via goimports + run: | + export PATH=$(go env GOPATH)/bin:$PATH + go get golang.org/x/tools/cmd/goimports + diff -u <(echo -n) <(goimports -d .) + - name: Run go vet + run: go vet -v ./... + - name: Run go test + run: go test -v ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 317f05c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: go -go: -- 1.3 -- 1.4 -- 1.5 -- 1.6 -- tip diff --git a/CHANGES.md b/CHANGES.md index 4539b84..14861dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## 4.0.0 + +Version 4 is identical to version 3 and just adds support for Go modules. + ## 3.0.0 * Remove quoting of table and column names introduced in 2.0.0 diff --git a/LICENSE b/LICENSE index be8f20a..b6606b4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2016 Thomas Cyron +Copyright (c) 2014-2020 Thomas Cyron Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c1dde9d..5b1bd6b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,22 @@ sqlbuilder ========== -[![Travis CI status](https://api.travis-ci.org/thcyron/sqlbuilder.svg)](https://travis-ci.org/thcyron/sqlbuilder) +[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/thcyron/sqlbuilder/v4) +[![CI status](https://github.com/thcyron/sqlbuilder/workflows/CI/badge.svg)](https://github.com/thcyron/sqlbuilder/actions?query=workflow%3ACI) `sqlbuilder` is a Go library for building SQL queries. -The latest stable version is [3.0.0](https://github.com/thcyron/sqlbuilder/tree/v3.0.0/). +The latest stable version is [4.0.0](https://github.com/thcyron/sqlbuilder/tree/v4.0.0/). +Version 4 is identical to version 3 with added support for Go modules. `sqlbuilder` follows [Semantic Versioning](http://semver.org/). -Installation ------------- +Usage +----- - go get github.com/thcyron/sqlbuilder +```go +import "github.com/thcyron/sqlbuilder/v4" +``` Examples -------- @@ -82,11 +86,6 @@ Or you can specify the dialect explicitly: sqlbuilder.Select().Dialect(sqlbuilder.Postgres).From("...")... ``` -Documentation -------------- - -Documentation is available at [GoDoc](https://godoc.org/github.com/thcyron/sqlbuilder). - License ------- diff --git a/dialect.go b/dialect.go index 2b77411..84a5641 100644 --- a/dialect.go +++ b/dialect.go @@ -1,8 +1,8 @@ package sqlbuilder import ( - "github.com/thcyron/sqlbuilder/mysql" - "github.com/thcyron/sqlbuilder/postgres" + "github.com/thcyron/sqlbuilder/v4/mysql" + "github.com/thcyron/sqlbuilder/v4/postgres" ) // Dialect represents a SQL dialect. diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4359343 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/thcyron/sqlbuilder/v4 + +go 1.14