Skip to content

Commit

Permalink
Merge pull request #91 from doug-martin/v7.0.0-rc
Browse files Browse the repository at this point in the history
v7.0.0
  • Loading branch information
doug-martin authored Jul 9, 2019
2 parents be19636 + abe9159 commit b25badd
Show file tree
Hide file tree
Showing 117 changed files with 22,717 additions and 12,318 deletions.
64 changes: 64 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
linters-settings:
govet:
check-shadowing: true
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
golint:
min-confidence: 0
gocyclo:
min-complexity: 20
maligned:
suggest-new: true
goconst:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
misspell:
locale: US
lll:
line-length: 140
exclude: '\/\/ '
goimports:
local-prefixes: github.com/golangci/golangci-lint
gocritic:
enabled-tags:
- performance
- style
disabled-checks:
- wrapperFunc

linters:
enable-all: true
disable:
- maligned
- prealloc
- gochecknoglobals
- gochecknoinits
- dupl

run:
skip-dirs:
- pkg/golinters/goanalysis/(checker|passes)

issues:
exclude-rules:
- text: "weak cryptographic primitive"
linters:
- gosec

# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.15.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
31 changes: 31 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
## v7.0.0

**Linting**
* Add linting checks and fixed errors
* Renamed all snake_case variables to be camelCase.
* Fixed examples to always map to a defined method
* Renamed `adapters` to `dialect` to more closely match their intended purpose.

**API Changes**
* Updated all sql generations methods to from `Sql` to `SQL`
* `ToSql` -> `ToSQL`
* `ToInsertSql` -> `ToInsertSQL`
* `ToUpdateSql` -> `ToUpdateSQL`
* `ToDeleteSql` -> `ToDeleteSQL`
* `ToTruncateSql` -> `ToTruncateSQL`
* Abstracted out `dialect_options` from the adapter to make the dialect self contained.
* This also removed the dataset<->adapter co dependency making the dialect self contained.
* Refactored the `goqu.I` method.
* Added new `goqu.S`, `goqu.T` and `goqu.C` methods to clarify why type of identifier you are using.
* `goqu.I` should only be used when you have a qualified identifier (e.g. `goqu.I("my_schema.my_table.my_col")
* Added new `goqu.Dialect` method to make using `goqu` as an SQL builder easier.

**Internal Changes**
* Pulled expressions into their own package
* Broke up expressions.go into multiple files to make working with and defining them easier.
* Moved the user facing methods into the main `goqu` to keep the same API as before.
* Added more examples
* Moved non-user facing structs and interfaces to internal modules to clean up API.
* Increased test coverage.


## v6.1.0

* Handle nil *time.Time Literal [#73](https://github.com/doug-martin/goqu/pull/73) and [#52](https://github.com/doug-martin/goqu/pull/52) - [@RoarkeRandall](https://github.com/RoarkeRandall) and [@quetz](https://github.com/quetz)
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#phony dependency task that does nothing
#"make executable" does not run if there is a ./executable directory, unless the task has a dependency
phony:

lint:
golangci-lint run
Loading

0 comments on commit b25badd

Please sign in to comment.