Commit c314bf18 authored by Vladimir Barsukov's avatar Vladimir Barsukov
Browse files

fix

parent 156d4a2a
package zcache
import (
"github.com/patrickmn/go-cache"
"time"
"github.com/patrickmn/go-cache"
)
func New(defaultExpiration, cleanupInterval time.Duration) *cache.Cache {
......
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
}
......@@ -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 {
......
......@@ -2,6 +2,7 @@ package zdb
import (
"fmt"
"github.com/jackc/pgx/v5/pgxpool"
)
......
......@@ -2,8 +2,9 @@ package zdb
import (
"errors"
"github.com/jackc/pgx/v5"
"strings"
"github.com/jackc/pgx/v5"
)
var ErrNoRows = pgx.ErrNoRows
......
......@@ -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 {
......
......@@ -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) {
......
......@@ -3,6 +3,7 @@ package zguid
import (
"crypto/md5"
"fmt"
"github.com/google/uuid"
)
......
......@@ -3,8 +3,9 @@
package zjson
import (
"github.com/goccy/go-json"
"unsafe"
"github.com/goccy/go-json"
)
func ToBytes(obj any) ([]byte, error) {
......
......@@ -4,6 +4,7 @@ package zmigrations
import (
"fmt"
"git.barsukov.pro/barsukov/zgo/zdb"
)
......
......@@ -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 {
......
......@@ -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 {
......
......@@ -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 {
......
......@@ -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 {
......
......@@ -2,8 +2,9 @@ package zsem
import (
"context"
"golang.org/x/sync/semaphore"
"runtime"
"golang.org/x/sync/semaphore"
)
type ZSem struct {
......
package zutils
import (
"golang.org/x/exp/constraints"
"reflect"
"sort"
"golang.org/x/exp/constraints"
)
func ArrayUnique[T comparable](s []T) []T {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment