Skip to content

Commit

Permalink
Merge pull request #309 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 12.39.0
  • Loading branch information
andyone committed Jan 7, 2022
2 parents f089a9a + 2024cdc commit b3d55db
Show file tree
Hide file tree
Showing 271 changed files with 1,593 additions and 770 deletions.
4 changes: 3 additions & 1 deletion .codebeatsettings
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"GOLANG": {
"ABC": [25, 50, 75, 100],
"CYCLO": [25, 50, 75, 100],
"CYCLO": [30, 50, 75, 100],
"TOO_MANY_IVARS": [12, 16, 20, 24],
"TOO_MANY_FUNCTIONS": [50, 70, 90, 120],
"LOC": [35, 50, 75, 100],
"TOTAL_COMPLEXITY": [100, 180, 280, 400],
"TOTAL_LOC": [500, 750, 1000, 2000]
}
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
## Changelog

### 12.39.0

* `[fmtc]` Added TrueColor support
* `[system]` Improved macOS support
* `[netutil]` Improved macOS support
* `[system]` Fixed bug with extracting macOS version
* `[system]` Fixed bug with extracting macOS arch info
* `[fmtc]` Code refactoring
* `[system]` Code refactoring
* Added more stubs for macOS
* Improved stubs for Windows

### 12.38.1

* Fixed build tags for Go ≤ 1.16
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ Auxiliary packages for Go.

### Platform support

Currently we support Linux and macOS (except `system` package). Some packages have stubs for Windows (_for autocomplete_).
Currently we support Linux and macOS (_except some packages_). All packages have stubs for unsupported platforms (_for autocomplete_).

<details><summary><b>More info about stubs</b></summary><p>

> Some packages cannot be used on some platforms, like `fsutil` package, which cannot be used on Windows due to using syscalls, or `system` sub-packages which require [procfs](https://en.wikipedia.org/wiki/Procfs). But you can write code on these platforms with no problem because almost all packages have stubs with information about all constants, variables, and functions available on other platforms. So, for example, Sublime with [LSP](https://lsp.sublimetext.io) on Windows will show all information about methods available only on the Linux platform. All descriptions from stubs contain symbol ❗ at the beginning as a mark of unsupported code. Code with stubs can be compiled, but any method invocation from stubs will lead to panic.
</p></details>

### Installation

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

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion ansi/ansi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ansi

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion ansi/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ansi

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cache

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cache

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cache/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cache

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion color/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package color

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion color/color_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package color

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion color/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package color

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cron

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cron/cron_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cron

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cron/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cron

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion cron/fuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package cron

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion csv/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package csv

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion csv/csv_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package csv

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion csv/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package csv

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
7 changes: 4 additions & 3 deletions directio/directio.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
//go:build !windows
// +build !windows

// Package directio provides methods for reading/writing files with direct io
package directio

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand All @@ -26,7 +29,6 @@ var blockPool = sync.Pool{
// ////////////////////////////////////////////////////////////////////////////////// //

// ReadFile read file with Direct IO without buffering data in page cache
// (currently only Unix and Mac OS X is supported)
func ReadFile(file string) ([]byte, error) {
fd, err := openFile(file, os.O_RDONLY, 0)

Expand All @@ -46,7 +48,6 @@ func ReadFile(file string) ([]byte, error) {
}

// WriteFile write file with Direct IO without buffering data in page cache
// (currently only Unix and Mac OS X is supported)
func WriteFile(file string, data []byte, perms os.FileMode) error {
fd, err := openFile(file, os.O_CREATE|os.O_WRONLY, perms)

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

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion directio/directio_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package directio

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion directio/directio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package directio

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
16 changes: 12 additions & 4 deletions directio/directio_windows.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Package directio provides methods for reading/writing files with direct io
package directio

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand All @@ -14,13 +15,20 @@ import (
// ////////////////////////////////////////////////////////////////////////////////// //

const (
BLOCK_SIZE = 0 // Minimal block size
ALIGN_SIZE = 0 // Align size
BLOCK_SIZE = 0 // Minimal block size
ALIGN_SIZE = 0 // Align size
)

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

func openFile(file string, flag int, perm os.FileMode) (*os.File, error) {
// ❗ ReadFile read file with Direct IO without buffering data in page cache
func ReadFile(file string) ([]byte, error) {
panic("UNSUPPORTED")
return nil, nil
}

// ❗ WriteFile write file with Direct IO without buffering data in page cache
func WriteFile(file string, data []byte, perms os.FileMode) error {
panic("UNSUPPORTED")
return nil
}
2 changes: 1 addition & 1 deletion easing/back.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package easing

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion easing/bounce.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package easing

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion easing/circ.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package easing

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down
2 changes: 1 addition & 1 deletion easing/cubic.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package easing

// ////////////////////////////////////////////////////////////////////////////////// //
// //
// Copyright (c) 2021 ESSENTIAL KAOS //
// Copyright (c) 2022 ESSENTIAL KAOS //
// Apache License, Version 2.0 <https://www.apache.org/licenses/LICENSE-2.0> //
// //
// ////////////////////////////////////////////////////////////////////////////////// //
Expand Down

0 comments on commit b3d55db

Please sign in to comment.