Skip to content

Instantly share code, notes, and snippets.

View sharonjl's full-sized avatar

Sharon L sharonjl

View GitHub Profile
@sharonjl
sharonjl / Canada
Created September 21, 2021 00:50
Timezones
America/Atikokan
America/Blanc-Sablon
America/Cambridge_Bay
America/Creston
America/Dawson
America/Dawson_Creek
America/Edmonton
America/Fort_Nelson
America/Glace_Bay
America/Goose_Bay
@sharonjl
sharonjl / queue.go
Last active August 10, 2022 01:45
basic queue in go (untested)
package queue
import "sync"
type Queue[T any] struct {
items []T
mu sync.RWMutex
}
func New[T any]() *Queue[T] {
@sharonjl
sharonjl / queue.go
Created November 17, 2022 18:25
postgresql queue with gorm
package pg
import (
"context"
"errors"
"fmt"
"time"
"github.com/google/uuid"
"gorm.io/gorm"