Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladimir Barsukov
zGo
Commits
c314bf18
Commit
c314bf18
authored
Oct 31, 2025
by
Vladimir Barsukov
Browse files
fix
parent
156d4a2a
Changes
16
Hide whitespace changes
Inline
Side-by-side
zcache/zcache.go
View file @
c314bf18
package
zcache
import
(
"github.com/patrickmn/go-cache"
"time"
"github.com/patrickmn/go-cache"
)
func
New
(
defaultExpiration
,
cleanupInterval
time
.
Duration
)
*
cache
.
Cache
{
...
...
zcron/zcron.go
View file @
c314bf18
package
zcron
import
(
"github.com/go-co-op/gocron"
"time"
"github.com/go-co-op/gocron"
)
func
New
(
loc
*
time
.
Location
)
*
gocron
.
Scheduler
{
...
...
@@ -11,7 +12,6 @@ func New(loc *time.Location) *gocron.Scheduler {
func
Default
()
*
gocron
.
Scheduler
{
s
:=
gocron
.
NewScheduler
(
time
.
UTC
)
s
.
SingletonModeAll
()
return
s
}
zdb/any.go
View file @
c314bf18
...
...
@@ -2,10 +2,11 @@ package zdb
import
(
"fmt"
"reflect"
"github.com/google/uuid"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"reflect"
)
func
(
d
*
Pool
)
WAny
(
dst
any
,
sql
string
,
args
...
any
)
error
{
...
...
zdb/conn.go
View file @
c314bf18
...
...
@@ -2,6 +2,7 @@ package zdb
import
(
"fmt"
"github.com/jackc/pgx/v5/pgxpool"
)
...
...
zdb/misc.go
View file @
c314bf18
...
...
@@ -2,8 +2,9 @@ package zdb
import
(
"errors"
"github.com/jackc/pgx/v5"
"strings"
"github.com/jackc/pgx/v5"
)
var
ErrNoRows
=
pgx
.
ErrNoRows
...
...
zdb/pool.go
View file @
c314bf18
...
...
@@ -3,13 +3,14 @@ package zdb
import
(
"context"
"fmt"
"github.com/jackc/pgx/v5/pgxpool"
"reflect"
"runtime"
"strings"
"sync"
"sync/atomic"
"time"
"github.com/jackc/pgx/v5/pgxpool"
)
type
Pool
struct
{
...
...
zdebug/zdebug.go
View file @
c314bf18
...
...
@@ -2,11 +2,12 @@ package zdebug
import
(
"fmt"
"git.barsukov.pro/barsukov/zgo/zutils"
"log"
"runtime"
"strings"
"time"
"git.barsukov.pro/barsukov/zgo/zutils"
)
func
NewMonitor
(
secs
int
)
{
...
...
zguid/zguid.go
View file @
c314bf18
...
...
@@ -3,6 +3,7 @@ package zguid
import
(
"crypto/md5"
"fmt"
"github.com/google/uuid"
)
...
...
zjson/go_json.go
View file @
c314bf18
...
...
@@ -3,8 +3,9 @@
package
zjson
import
(
"github.com/goccy/go-json"
"unsafe"
"github.com/goccy/go-json"
)
func
ToBytes
(
obj
any
)
([]
byte
,
error
)
{
...
...
zmigrations/dev.go
View file @
c314bf18
...
...
@@ -4,6 +4,7 @@ package zmigrations
import
(
"fmt"
"git.barsukov.pro/barsukov/zgo/zdb"
)
...
...
zmigrations/zmigration.go
View file @
c314bf18
...
...
@@ -3,9 +3,10 @@ package zmigrations
import
(
"embed"
"fmt"
"git.barsukov.pro/barsukov/zgo/zdb"
"io/fs"
"log"
"git.barsukov.pro/barsukov/zgo/zdb"
)
func
Migrations
(
db
*
zdb
.
Pool
,
files
embed
.
FS
,
loc
string
,
reCreateSchema
...
string
)
error
{
...
...
zq/zq.go
View file @
c314bf18
...
...
@@ -2,9 +2,10 @@ package zq
import
(
"fmt"
"runtime"
"git.barsukov.pro/barsukov/zgo/zatomic"
"git.barsukov.pro/barsukov/zgo/zquit"
"runtime"
)
type
ZQ
struct
{
...
...
zquit/zquit.go
View file @
c314bf18
...
...
@@ -2,14 +2,15 @@ package zquit
import
(
"fmt"
"git.barsukov.pro/barsukov/zgo/zwg"
"github.com/gin-gonic/gin"
"log"
"net/http"
"os"
"os/signal"
"syscall"
"time"
"git.barsukov.pro/barsukov/zgo/zwg"
"github.com/gin-gonic/gin"
)
type
ZQuit
struct
{
...
...
zs3/zs3.go
View file @
c314bf18
...
...
@@ -3,11 +3,12 @@ package zs3
import
(
"bytes"
"fmt"
"io"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"io"
)
type
ZS3
struct
{
...
...
zsem/zsem.go
View file @
c314bf18
...
...
@@ -2,8 +2,9 @@ package zsem
import
(
"context"
"golang.org/x/sync/semaphore"
"runtime"
"golang.org/x/sync/semaphore"
)
type
ZSem
struct
{
...
...
zutils/array.go
View file @
c314bf18
package
zutils
import
(
"golang.org/x/exp/constraints"
"reflect"
"sort"
"golang.org/x/exp/constraints"
)
func
ArrayUnique
[
T
comparable
](
s
[]
T
)
[]
T
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment