Skip to content

Commit

Permalink
Merge pull request #486 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 13.0.0
  • Loading branch information
andyone authored Jul 7, 2024
2 parents f6c969f + 45686f4 commit 2157401
Show file tree
Hide file tree
Showing 114 changed files with 381 additions and 421 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
- type: textarea
attributes:
label: Module version info
description: Output of `go list -m -u github.com/essentialkaos/ek/v12` command
description: Output of `go list -m -u github.com/essentialkaos/ek/v13` command
render: shell
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ body:
- type: textarea
attributes:
label: Related module version info
description: Output of `go list -m -u github.com/essentialkaos/ek/v12` command
description: Output of `go list -m -u github.com/essentialkaos/ek/v13` command
render: shell
validations:
required: true
4 changes: 2 additions & 2 deletions .scripts/fuzz-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ main() {
if [[ "$src_func" == "Fuzz" ]] ; then
showm " ${CL_GREY}${CL_BOLD}${src_package}${CL_NORM}"
output="${src_name}-fuzz.zip"
go-fuzz-build -o "$output" "github.com/essentialkaos/ek/v12/${src_path}" &> /dev/null
go-fuzz-build -o "$output" "github.com/essentialkaos/ek/v13/${src_path}" &> /dev/null
else
showm " ${CL_GREY}${CL_BOLD}${src_package}${CL_NORM} ${CL_GREY}($src_func)${CL_NORM}"
func_min=$(echo "$src_func" | sed 's/Fuzz//' | tr '[:upper:]' '[:lower:]')
output="${src_name}-${func_min}-fuzz.zip"
go-fuzz-build -func "$src_func" -o "$output" "github.com/essentialkaos/ek/v12/${src_path}" &> /dev/null
go-fuzz-build -func "$src_func" -o "$output" "github.com/essentialkaos/ek/v13/${src_path}" &> /dev/null
fi

# shellcheck disable=SC2181
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## Changelog

### [13.0.0](https://kaos.sh/ek/13.0.0)

> [!CAUTION]
> In this release, we have changed the logic behind some knf validators (`Less`, `Greater`, `LenLess`, `LenGreater`) from negative to positive check. This means that if you have any of these validators, you need to swap them (`Less``Greater`, `Greater``Less`, `LenLess``LenGreater`, `LenGreater``LenLess`) to keep the logic of the validation.
- `[knf/validators]` Changed logic from negative to positive check for `Less`, `Greater`, `LenLess`, and `LenGreater` validators.
- `[knf/validators]` Validator `LenNotEquals` renamed to `LenEquals`
- `[knf/validators]` Validator `NotPrefix` renamed to `NotPrefix`
- `[knf/validators]` Validator `HasSuffix` renamed to `HasSuffix`
- `[knf/validators]` Validator `Equals` renamed to `NotEquals`
- `[log]` Code refactoring

---

### [12.130.0](https://kaos.sh/ek/12.130.0)

- `[knf/validators]` Added validators `Set`, `SetToAny`, `SetToAnyIgnoreCase`, `LenLess`, `LenGreater`, and `LenNotEquals`
Expand Down
137 changes: 68 additions & 69 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion color/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"math"
"strconv"

"github.com/essentialkaos/ek/v12/mathutil"
"github.com/essentialkaos/ek/v13/mathutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion color/color_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package color
import (
"testing"

"github.com/essentialkaos/ek/v12/mathutil"
"github.com/essentialkaos/ek/v13/mathutil"

. "github.com/essentialkaos/check"
)
Expand Down
2 changes: 1 addition & 1 deletion cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strings"
"time"

"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v13/strutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion ek.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
// ////////////////////////////////////////////////////////////////////////////////// //

// VERSION is current ek package version
const VERSION = "12.130.0"
const VERSION = "13.0.0"

// ////////////////////////////////////////////////////////////////////////////////// //

Expand Down
4 changes: 2 additions & 2 deletions fmtc/fmtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"strings"
"sync"

"github.com/essentialkaos/ek/v12/color"
"github.com/essentialkaos/ek/v12/env"
"github.com/essentialkaos/ek/v13/color"
"github.com/essentialkaos/ek/v13/env"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fmtc/fmtc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"os"
"testing"

"github.com/essentialkaos/ek/v12/env"
"github.com/essentialkaos/ek/v13/env"

. "github.com/essentialkaos/check"
)
Expand Down
6 changes: 3 additions & 3 deletions fmtutil/fmtutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"strconv"
"strings"

"github.com/essentialkaos/ek/v12/ansi"
"github.com/essentialkaos/ek/v12/mathutil"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v13/ansi"
"github.com/essentialkaos/ek/v13/mathutil"
"github.com/essentialkaos/ek/v13/strutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
10 changes: 5 additions & 5 deletions fmtutil/panel/panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"bytes"
"strings"

"github.com/essentialkaos/ek/v12/fmtc"
"github.com/essentialkaos/ek/v12/fmtutil"
"github.com/essentialkaos/ek/v12/mathutil"
"github.com/essentialkaos/ek/v12/sliceutil"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v13/fmtc"
"github.com/essentialkaos/ek/v13/fmtutil"
"github.com/essentialkaos/ek/v13/mathutil"
"github.com/essentialkaos/ek/v13/sliceutil"
"github.com/essentialkaos/ek/v13/strutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fmtutil/panel/panel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package panel
import (
"testing"

"github.com/essentialkaos/ek/v12/fmtc"
"github.com/essentialkaos/ek/v13/fmtc"

. "github.com/essentialkaos/check"
)
Expand Down
4 changes: 2 additions & 2 deletions fmtutil/separator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package fmtutil
import (
"strings"

"github.com/essentialkaos/ek/v12/fmtc"
"github.com/essentialkaos/ek/v12/terminal/tty"
"github.com/essentialkaos/ek/v13/fmtc"
"github.com/essentialkaos/ek/v13/terminal/tty"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
8 changes: 4 additions & 4 deletions fmtutil/table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"fmt"
"strings"

"github.com/essentialkaos/ek/v12/fmtc"
"github.com/essentialkaos/ek/v12/mathutil"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v12/terminal/tty"
"github.com/essentialkaos/ek/v13/fmtc"
"github.com/essentialkaos/ek/v13/mathutil"
"github.com/essentialkaos/ek/v13/strutil"
"github.com/essentialkaos/ek/v13/terminal/tty"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
4 changes: 2 additions & 2 deletions fsutil/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"syscall"
"time"

PATH "github.com/essentialkaos/ek/v12/path"
"github.com/essentialkaos/ek/v12/system"
PATH "github.com/essentialkaos/ek/v13/path"
"github.com/essentialkaos/ek/v13/system"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fsutil/fs_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"syscall"
"time"

PATH "github.com/essentialkaos/ek/v12/path"
PATH "github.com/essentialkaos/ek/v13/path"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fsutil/fs_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"syscall"
"time"

PATH "github.com/essentialkaos/ek/v12/path"
PATH "github.com/essentialkaos/ek/v13/path"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fsutil/fs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"syscall"
"time"

PATH "github.com/essentialkaos/ek/v12/path"
PATH "github.com/essentialkaos/ek/v13/path"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fsutil/fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"testing"
"time"

"github.com/essentialkaos/ek/v12/system"
"github.com/essentialkaos/ek/v13/system"

check "github.com/essentialkaos/check"
)
Expand Down
2 changes: 1 addition & 1 deletion fsutil/fs_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package fsutil
// ////////////////////////////////////////////////////////////////////////////////// //

import (
"github.com/essentialkaos/ek/v12/system"
"github.com/essentialkaos/ek/v13/system"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion fsutil/fs_user_unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ package fsutil

import (
"errors"
"github.com/essentialkaos/ek/v12/system"
"github.com/essentialkaos/ek/v13/system"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/essentialkaos/ek/v12
module github.com/essentialkaos/ek/v13

go 1.18

Expand Down
4 changes: 2 additions & 2 deletions i18n/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"strings"
"text/template"

"github.com/essentialkaos/ek/v12/fmtutil"
"github.com/essentialkaos/ek/v12/pluralize"
"github.com/essentialkaos/ek/v13/fmtutil"
"github.com/essentialkaos/ek/v13/pluralize"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
6 changes: 3 additions & 3 deletions initsystem/initsystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"strings"
"syscall"

"github.com/essentialkaos/ek/v12/env"
"github.com/essentialkaos/ek/v12/fsutil"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v13/env"
"github.com/essentialkaos/ek/v13/fsutil"
"github.com/essentialkaos/ek/v13/strutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion initsystem/initsystem_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"os/exec"
"strings"

"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v13/strutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion jsonutil/jsonutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

. "github.com/essentialkaos/check"

"github.com/essentialkaos/ek/v12/fsutil"
"github.com/essentialkaos/ek/v13/fsutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
4 changes: 2 additions & 2 deletions knf/knf.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"sync"
"time"

"github.com/essentialkaos/ek/v12/knf/value"
"github.com/essentialkaos/ek/v12/sliceutil"
"github.com/essentialkaos/ek/v13/knf/value"
"github.com/essentialkaos/ek/v13/sliceutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
4 changes: 2 additions & 2 deletions knf/united/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ package united
import (
"fmt"

"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v12/options"
"github.com/essentialkaos/ek/v13/knf"
"github.com/essentialkaos/ek/v13/options"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
8 changes: 4 additions & 4 deletions knf/united/united.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"strings"
"time"

"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v12/knf/value"
"github.com/essentialkaos/ek/v12/options"
"github.com/essentialkaos/ek/v12/strutil"
"github.com/essentialkaos/ek/v13/knf"
"github.com/essentialkaos/ek/v13/knf/value"
"github.com/essentialkaos/ek/v13/options"
"github.com/essentialkaos/ek/v13/strutil"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
12 changes: 6 additions & 6 deletions knf/united/united_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"testing"
"time"

"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v12/options"
"github.com/essentialkaos/ek/v13/knf"
"github.com/essentialkaos/ek/v13/options"

knfv "github.com/essentialkaos/ek/v12/knf/validators"
knfv "github.com/essentialkaos/ek/v13/knf/validators"

. "github.com/essentialkaos/check"
)
Expand Down Expand Up @@ -257,7 +257,7 @@ func (s *UnitedSuite) TestValidation(c *C) {
global = nil

errs := Validate([]*knf.Validator{
{"test:string", knfv.Empty, nil},
{"test:string", knfv.Set, nil},
})

c.Assert(errs, HasLen, 1)
Expand All @@ -278,8 +278,8 @@ func (s *UnitedSuite) TestValidation(c *C) {
c.Assert(err, IsNil)

errs = Validate([]*knf.Validator{
{"test:string", knfv.Empty, nil},
{"test:integer", knfv.Greater, 100},
{"test:string", knfv.Set, nil},
{"test:integer", knfv.Less, 100},
})

c.Assert(errs, HasLen, 1)
Expand Down
8 changes: 4 additions & 4 deletions knf/validators/fs/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"fmt"
"os"

"github.com/essentialkaos/ek/v12/fsutil"
"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v12/path"
"github.com/essentialkaos/ek/v12/system"
"github.com/essentialkaos/ek/v13/fsutil"
"github.com/essentialkaos/ek/v13/knf"
"github.com/essentialkaos/ek/v13/path"
"github.com/essentialkaos/ek/v13/system"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion knf/validators/fs/validators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"runtime"
"testing"

"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v13/knf"

. "github.com/essentialkaos/check"
)
Expand Down
2 changes: 1 addition & 1 deletion knf/validators/network/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"net/url"
"strings"

"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v13/knf"
)

// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion knf/validators/network/validators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"testing"

"github.com/essentialkaos/ek/v12/knf"
"github.com/essentialkaos/ek/v13/knf"

. "github.com/essentialkaos/check"
)
Expand Down
Loading

0 comments on commit 2157401

Please sign in to comment.