rename package

This commit is contained in:
2024-05-20 17:16:35 +03:00
parent 5724100dbb
commit acb28eac8e
20 changed files with 69 additions and 288 deletions
-12
View File
@@ -1,12 +0,0 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: gocron
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
-18
View File
@@ -1,18 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# Maintain Go dependencies
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
-71
View File
@@ -1,71 +0,0 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ v2 ]
branches-ignore:
- "dependabot/**"
pull_request:
paths-ignore:
- '**.md'
# The branches below must be a subset of the branches above
branches: [ v2 ]
schedule:
- cron: '34 7 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
-19
View File
@@ -1,19 +0,0 @@
on:
push:
branches:
- v2
pull_request:
branches:
- v2
name: formatting
jobs:
check-sorted:
name: check sorted
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: verify example_test.go
run: |
grep "^func " example_test.go | sort -c
-31
View File
@@ -1,31 +0,0 @@
on:
push:
branches:
- v2
pull_request:
branches:
- v2
name: golangci-lint
jobs:
golangci:
strategy:
matrix:
go-version:
- "1.20"
- "1.21"
name: lint and test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v4.0.0
with:
version: v1.55.2
- name: test
run: make test
-49
View File
@@ -1,49 +0,0 @@
run:
timeout: 5m
issues-exit-code: 1
tests: true
skip-dirs:
- local
issues:
max-same-issues: 100
include:
- EXC0012
- EXC0014
linters:
enable:
- bodyclose
- exportloopref
- gofumpt
- goimports
- gosec
- gosimple
- govet
- ineffassign
- misspell
- revive
- staticcheck
- typecheck
- unused
- whitespace
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
# print lines of code with issue, default is true
print-issued-lines: true
# print linter name in the end of issue text, default is true
print-linter-name: true
# make issues output unique by line, default is true
uniq-by-line: true
# add a prefix to the output file references; default is no prefix
path-prefix: ""
# sorts results by: filepath, line and column
sort-results: true
linters-settings:
golint:
min-confidence: 0.8
fix: true
-24
View File
@@ -1,24 +0,0 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/golangci/golangci-lint
rev: v1.55.2
hooks:
- id: golangci-lint
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
- id: go-fumpt
args:
- -w
- id: go-mod-tidy
+29 -31
View File
@@ -1,8 +1,5 @@
# gocron: A Golang Job Scheduling Package # gocron: A Golang Job Scheduling Package
[![CI State](https://github.com/andoma-go/gocron/actions/workflows/go_test.yml/badge.svg?branch=v2&event=push)](https://github.com/andoma-go/gocron/actions)
![Go Report Card](https://goreportcard.com/badge/github.com/andoma-go/gocron) [![Go Doc](https://godoc.org/github.com/andoma-go/gocron/v2?status.svg)](https://pkg.go.dev/github.com/andoma-go/gocron/v2)
gocron is a job scheduling package which lets you run Go functions at pre-determined intervals. gocron is a job scheduling package which lets you run Go functions at pre-determined intervals.
If you want to chat, you can find us on Slack at If you want to chat, you can find us on Slack at
@@ -11,7 +8,7 @@ If you want to chat, you can find us on Slack at
## Quick Start ## Quick Start
``` ```
go get github.com/andoma-go/gocron/v2 go get git.company.lan/gopkg/gocron/v2
``` ```
```golang ```golang
@@ -21,7 +18,7 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/andoma-go/gocron/v2" "git.company.lan/gopkg/gocron/v2"
) )
func main() { func main() {
@@ -68,7 +65,7 @@ func main() {
## Examples ## Examples
- [Go doc examples](https://pkg.go.dev/github.com/andoma-go/gocron/v2#pkg-examples) - [Go doc examples](https://pkg.go.dev/github.com/go-co-op/gocron/v2#pkg-examples)
- [Examples directory](examples) - [Examples directory](examples)
## Concepts ## Concepts
@@ -86,29 +83,29 @@ func main() {
Jobs can be run at various intervals. Jobs can be run at various intervals.
- [**Duration**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#DurationJob): - [**Duration**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#DurationJob):
Jobs can be run at a fixed `time.Duration`. Jobs can be run at a fixed `time.Duration`.
- [**Random duration**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#DurationRandomJob): - [**Random duration**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#DurationRandomJob):
Jobs can be run at a random `time.Duration` between a min and max. Jobs can be run at a random `time.Duration` between a min and max.
- [**Cron**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#CronJob): - [**Cron**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#CronJob):
Jobs can be run using a crontab. Jobs can be run using a crontab.
- [**Daily**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#DailyJob): - [**Daily**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#DailyJob):
Jobs can be run every x days at specific times. Jobs can be run every x days at specific times.
- [**Weekly**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WeeklyJob): - [**Weekly**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WeeklyJob):
Jobs can be run every x weeks on specific days of the week and at specific times. Jobs can be run every x weeks on specific days of the week and at specific times.
- [**Monthly**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#MonthlyJob): - [**Monthly**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#MonthlyJob):
Jobs can be run every x months on specific days of the month and at specific times. Jobs can be run every x months on specific days of the month and at specific times.
- [**One time**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#OneTimeJob): - [**One time**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#OneTimeJob):
Jobs can be run once at a specific time. These are non-recurring jobs. Jobs can be run once at a specific time. These are non-recurring jobs.
### Concurrency Limits ### Concurrency Limits
Jobs can be limited individually or across the entire scheduler. Jobs can be limited individually or across the entire scheduler.
- [**Per job limiting with singleton mode**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithSingletonMode): - [**Per job limiting with singleton mode**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithSingletonMode):
Jobs can be limited to a single concurrent execution that either reschedules (skips overlapping executions) Jobs can be limited to a single concurrent execution that either reschedules (skips overlapping executions)
or queues (waits for the previous execution to finish). or queues (waits for the previous execution to finish).
- [**Per scheduler limiting with limit mode**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithLimitConcurrentJobs): - [**Per scheduler limiting with limit mode**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithLimitConcurrentJobs):
Jobs can be limited to a certain number of concurrent executions across the entire scheduler Jobs can be limited to a certain number of concurrent executions across the entire scheduler
using either reschedule (skip when the limit is met) or queue (jobs are added to a queue to using either reschedule (skip when the limit is met) or queue (jobs are added to a queue to
wait for the limit to be available). wait for the limit to be available).
@@ -118,43 +115,44 @@ Jobs can be limited individually or across the entire scheduler.
Multiple instances of gocron can be run. Multiple instances of gocron can be run.
- [**Elector**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithDistributedElector): - [**Elector**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithDistributedElector):
An elector can be used to elect a single instance of gocron to run as the primary with the An elector can be used to elect a single instance of gocron to run as the primary with the
other instances checking to see if a new leader needs to be elected. other instances checking to see if a new leader needs to be elected.
- Implementations: [andoma-go electors](https://github.com/andoma-go?q=-elector&type=all&language=&sort=) - Implementations: [go-co-op electors](https://github.com/go-co-op?q=-elector&type=all&language=&sort=)
(don't see what you need? request on slack to get a repo created to contribute it!) (don't see what you need? request on slack to get a repo created to contribute it!)
- [**Locker**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithDistributedLocker): - [**Locker**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithDistributedLocker):
A locker can be used to lock each run of a job to a single instance of gocron. A locker can be used to lock each run of a job to a single instance of gocron.
- Implementations: [andoma-go lockers](https://github.com/andoma-go?q=-lock&type=all&language=&sort=) Locker can be at job or scheduler, if it is defined both at job and scheduler then locker of job will take precedence.
- Implementations: [go-co-op lockers](https://github.com/go-co-op?q=-lock&type=all&language=&sort=)
(don't see what you need? request on slack to get a repo created to contribute it!) (don't see what you need? request on slack to get a repo created to contribute it!)
### Events ### Events
Job events can trigger actions. Job events can trigger actions.
- [**Listeners**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithEventListeners): - [**Listeners**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithEventListeners):
Can be added to a job, with [event listeners](https://pkg.go.dev/github.com/andoma-go/gocron/v2#EventListener), Can be added to a job, with [event listeners](https://pkg.go.dev/github.com/go-co-op/gocron/v2#EventListener),
or all jobs across the or all jobs across the
[scheduler](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithGlobalJobOptions) [scheduler](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithGlobalJobOptions)
to listen for job events and trigger actions. to listen for job events and trigger actions.
### Options ### Options
Many job and scheduler options are available. Many job and scheduler options are available.
- [**Job options**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#JobOption): - [**Job options**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#JobOption):
Job options can be set when creating a job using `NewJob`. Job options can be set when creating a job using `NewJob`.
- [**Global job options**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithGlobalJobOptions): - [**Global job options**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithGlobalJobOptions):
Global job options can be set when creating a scheduler using `NewScheduler` Global job options can be set when creating a scheduler using `NewScheduler`
and the `WithGlobalJobOptions` option. and the `WithGlobalJobOptions` option.
- [**Scheduler options**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#SchedulerOption): - [**Scheduler options**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#SchedulerOption):
Scheduler options can be set when creating a scheduler using `NewScheduler`. Scheduler options can be set when creating a scheduler using `NewScheduler`.
### Logging ### Logging
Logs can be enabled. Logs can be enabled.
- [Logger](https://pkg.go.dev/github.com/andoma-go/gocron/v2#Logger): - [Logger](https://pkg.go.dev/github.com/go-co-op/gocron/v2#Logger):
The Logger interface can be implemented with your desired logging library. The Logger interface can be implemented with your desired logging library.
The provided NewLogger uses the standard library's log package. The provided NewLogger uses the standard library's log package.
@@ -162,9 +160,9 @@ Logs can be enabled.
Metrics may be collected from the execution of each job. Metrics may be collected from the execution of each job.
- [**Monitor**](https://pkg.go.dev/github.com/andoma-go/gocron/v2#Monitor): - [**Monitor**](https://pkg.go.dev/github.com/go-co-op/gocron/v2#Monitor):
A monitor can be used to collect metrics for each job from a scheduler. A monitor can be used to collect metrics for each job from a scheduler.
- Implementations: [andoma-go monitors](https://github.com/andoma-go?q=-monitor&type=all&language=&sort=) - Implementations: [go-co-op monitors](https://github.com/go-co-op?q=-monitor&type=all&language=&sort=)
(don't see what you need? request on slack to get a repo created to contribute it!) (don't see what you need? request on slack to get a repo created to contribute it!)
### Testing ### Testing
@@ -173,8 +171,8 @@ The gocron library is set up to enable testing.
- Mocks are provided in [the mock package](mocks) using [gomock](https://github.com/uber-go/mock). - Mocks are provided in [the mock package](mocks) using [gomock](https://github.com/uber-go/mock).
- Time can be mocked by passing in a [FakeClock](https://pkg.go.dev/github.com/jonboulle/clockwork#FakeClock) - Time can be mocked by passing in a [FakeClock](https://pkg.go.dev/github.com/jonboulle/clockwork#FakeClock)
to [WithClock](https://pkg.go.dev/github.com/andoma-go/gocron/v2#WithClock) - to [WithClock](https://pkg.go.dev/github.com/go-co-op/gocron/v2#WithClock) -
see the [example on WithClock](https://pkg.go.dev/github.com/andoma-go/gocron/v2#example-WithClock). see the [example on WithClock](https://pkg.go.dev/github.com/go-co-op/gocron/v2#example-WithClock).
## Supporters ## Supporters
@@ -187,4 +185,4 @@ This project is supported by:
## Star History ## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=andoma-go/gocron&type=Date)](https://star-history.com/#andoma-go/gocron&Date) [![Star History Chart](https://api.star-history.com/svg?repos=go-co-op/gocron&type=Date)](https://star-history.com/#go-co-op/gocron&Date)
+4 -4
View File
@@ -4,13 +4,13 @@
The current plan is to maintain version 2 as long as possible incorporating any necessary security patches. Version 1 is deprecated and will no longer be patched. The current plan is to maintain version 2 as long as possible incorporating any necessary security patches. Version 1 is deprecated and will no longer be patched.
| Version | Supported | | Version | Supported |
| ------- | ------------------ | | ------- | ------------------------ |
| 1.x.x | :heavy_multiplication_x: | | 1.x.x | :heavy_multiplication_x: |
| 2.x.x | :white_check_mark: | | 2.x.x | :white_check_mark: |
## Reporting a Vulnerability ## Reporting a Vulnerability
Vulnerabilities can be reported by [opening an issue](https://github.com/andoma-go/gocron/issues/new/choose) or reaching out on Slack: [<img src="https://img.shields.io/badge/gophers-gocron-brightgreen?logo=slack">](https://gophers.slack.com/archives/CQ7T0T1FW) Vulnerabilities can be reported by [opening an issue](https://github.com/go-co-op/gocron/issues/new/choose) or reaching out on Slack: [<img src="https://img.shields.io/badge/gophers-gocron-brightgreen?logo=slack">](https://gophers.slack.com/archives/CQ7T0T1FW)
We will do our best to addrerss any vulnerabilities in an expeditious manner. We will do our best to addrerss any vulnerabilities in an expeditious manner.
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"sync" "sync"
"time" "time"
. "github.com/andoma-go/gocron/v2" // nolint:revive . "git.company.lan/gopkg/gocron/v2" // nolint:revive
"github.com/google/uuid" "github.com/google/uuid"
"github.com/jonboulle/clockwork" "github.com/jonboulle/clockwork"
) )
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"log" "log"
"time" "time"
"github.com/andoma-go/gocron/v2" "git.company.lan/gopkg/gocron/v2"
) )
var _ gocron.Elector = (*myElector)(nil) var _ gocron.Elector = (*myElector)(nil)
+3 -3
View File
@@ -1,6 +1,6 @@
module github.com/andoma-go/gocron/v2 module git.company.lan/gopkg/gocron/v2
go 1.20 go 1.21.5
require ( require (
github.com/google/uuid v1.6.0 github.com/google/uuid v1.6.0
@@ -8,7 +8,7 @@ require (
github.com/robfig/cron/v3 v3.0.1 github.com/robfig/cron/v3 v3.0.1
github.com/stretchr/testify v1.9.0 github.com/stretchr/testify v1.9.0
go.uber.org/goleak v1.3.0 go.uber.org/goleak v1.3.0
golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
) )
require ( require (
+2 -2
View File
@@ -19,8 +19,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 h1:+iq7lrkxmFNBM7xx+Rae2W6uyPfhPeDWD+n+JgppptE= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
golang.org/x/exp v0.0.0-20231219180239-dc181d75b848/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+3 -3
View File
@@ -3,7 +3,7 @@
## Quick Start ## Quick Start
``` ```
go get github.com/andoma-go/gocronmocks/v2 go get git.company.lan/gopkg/gocron/mocks/v2
``` ```
write a test write a test
@@ -14,8 +14,8 @@ package main
import ( import (
"testing" "testing"
"github.com/andoma-go/gocron/v2" "git.company.lan/gopkg/gocron/v2"
"github.com/andoma-go/gocronmocks/v2" "git.company.lan/gopkg/gocron/mocks/v2"
"go.uber.org/mock/gomock" "go.uber.org/mock/gomock"
) )
+2 -2
View File
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/andoma-go/gocron/v2 (interfaces: Elector,Locker,Lock) // Source: git.company.lan/gopkg/gocron/v2 (interfaces: Elector,Locker,Lock)
// //
// Generated by this command: // Generated by this command:
// //
@@ -12,7 +12,7 @@ import (
context "context" context "context"
reflect "reflect" reflect "reflect"
gocron "github.com/andoma-go/gocron/v2" gocron "git.company.lan/gopkg/gocron/v2"
gomock "go.uber.org/mock/gomock" gomock "go.uber.org/mock/gomock"
) )
+8 -6
View File
@@ -1,16 +1,18 @@
module github.com/andoma-go/gocronmocks/v2 module git.company.lan/gopkg/gocron/mocks/v2
go 1.20 go 1.21.5
require ( require (
github.com/andoma-go/gocron/v2 v2.0.0-rc4 git.company.lan/gopkg/gocron/v2 v2.0.0-00010101000000-000000000000
github.com/golang/mock v1.6.0 github.com/golang/mock v1.6.0
github.com/google/uuid v1.4.0 github.com/google/uuid v1.6.0
go.uber.org/mock v0.3.0 go.uber.org/mock v0.4.0
) )
require ( require (
github.com/jonboulle/clockwork v0.4.0 // indirect github.com/jonboulle/clockwork v0.4.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
) )
replace git.company.lan/gopkg/gocron/v2 => ../.
+12 -7
View File
@@ -1,24 +1,28 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/andoma-go/gocron/v2 v2.0.0-rc4 h1:KFYg2CzyHZwPZL/uNnQKEyeL9oKEUQbiLThArcZaVmw= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/andoma-go/gocron/v2 v2.0.0-rc4/go.mod h1:3SLoqKnyORFVN0VvFFb1383hM4WD9XHBPn9aUUp7sQs=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo=
go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -40,3 +44,4 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+1 -1
View File
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/andoma-go/gocron/v2 (interfaces: Job) // Source: git.company.lan/gopkg/gocron/v2 (interfaces: Job)
// //
// Generated by this command: // Generated by this command:
// //
+1 -1
View File
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/andoma-go/gocron/v2 (interfaces: Logger) // Source: git.company.lan/gopkg/gocron/v2 (interfaces: Logger)
// //
// Generated by this command: // Generated by this command:
// //
+2 -2
View File
@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT. // Code generated by MockGen. DO NOT EDIT.
// Source: github.com/andoma-go/gocron/v2 (interfaces: Scheduler) // Source: git.company.lan/gopkg/gocron/v2 (interfaces: Scheduler)
// Package gocronmocks is a generated GoMock package. // Package gocronmocks is a generated GoMock package.
package gocronmocks package gocronmocks
@@ -7,7 +7,7 @@ package gocronmocks
import ( import (
reflect "reflect" reflect "reflect"
gocron "github.com/andoma-go/gocron/v2" gocron "git.company.lan/gopkg/gocron/v2"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
uuid "github.com/google/uuid" uuid "github.com/google/uuid"
) )