-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18b5f8f
commit a5f56c3
Showing
263 changed files
with
74,585 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package migrations | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/jacobbrewer1/goschema/pkg/models" | ||
) | ||
|
||
func (v *versioning) GetStatus() ([]*models.GoschemaMigrationVersion, error) { | ||
sqlStmt := ` | ||
SELECT version | ||
FROM goschema_migration_version | ||
ORDER BY created_at DESC; | ||
` | ||
|
||
ids := make([]string, 0) | ||
if err := v.db.Select(&ids, sqlStmt); err != nil { | ||
return nil, fmt.Errorf("get status ids: %w", err) | ||
} | ||
|
||
versions := make([]*models.GoschemaMigrationVersion, len(ids)) | ||
for i, id := range ids { | ||
ver, err := models.GoschemaMigrationVersionByVersion(v.db, id) | ||
if err != nil { | ||
return nil, fmt.Errorf("get status version by version: %w", err) | ||
} | ||
|
||
versions[i] = ver | ||
} | ||
|
||
return versions, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
### Go template | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
vendor/ | ||
|
||
### IntelliJ | ||
.idea | ||
*.iml | ||
out | ||
gen | ||
|
||
### VisualStudioCode | ||
.vscode | ||
*.code-workspace | ||
|
||
### macOS | ||
# General | ||
.DS_Store | ||
experimenting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
linters-settings: | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
disabled-checks: | ||
- dupImport | ||
- ifElseChain | ||
- octalLiteral | ||
- whyNoLint | ||
- wrapperFunc | ||
- exitAfterDefer | ||
- hugeParam | ||
- ptrToRefParam | ||
- paramTypeCombine | ||
- unnamedResult | ||
linters: | ||
disable-all: true | ||
enable: | ||
# default linters | ||
- errcheck | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- typecheck | ||
- unused | ||
# additional linters | ||
- asasalint | ||
- asciicheck | ||
- bidichk | ||
- bodyclose | ||
- containedctx | ||
- contextcheck | ||
- decorder | ||
- dupl | ||
- durationcheck | ||
- errchkjson | ||
- errname | ||
- errorlint | ||
- exhaustive | ||
- exhaustruct | ||
- exportloopref | ||
- forcetypeassert | ||
- gocheckcompilerdirectives | ||
- gocritic | ||
- godot | ||
- godox | ||
- goerr113 | ||
- gofmt | ||
- goprintffuncname | ||
- gosec | ||
- gosmopolitan | ||
- importas | ||
- ireturn | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- rowserrcheck | ||
- tagalign | ||
- tenv | ||
- thelper | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
- usestdlibvars | ||
- wastedassign | ||
- whitespace | ||
- wrapcheck | ||
- wsl | ||
- gocyclo | ||
- misspell | ||
issues: | ||
include: | ||
- EXC0012 | ||
- EXC0014 | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- gocyclo | ||
- errcheck | ||
- dupl | ||
- gosec | ||
- gocritic | ||
- linters: | ||
- gocritic | ||
text: "unnecessaryDefer:" | ||
- linters: | ||
- gocritic | ||
text: "preferDecodeRune:" | ||
service: | ||
golangci-lint-version: 1.53.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<a name="unreleased"></a> | ||
## [Unreleased] | ||
|
||
|
||
<a name="v0.0.1"></a> | ||
## v0.0.1 - 2021-05-09 | ||
### Features | ||
- implement `Area` | ||
- add `ClearLinesUp` and `ClearLinesDown` | ||
- implement cross-platform support | ||
- implement cursor functions | ||
|
||
### Bug Fixes | ||
- height can no longer be negative on non windows systems | ||
|
||
### Code Refactoring | ||
- remove debug code | ||
|
||
|
||
[Unreleased]: https://github.com/MarvinJWendt/testza/compare/v0.0.1...HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Marvin Wendt (MarvinJWendt) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.