repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
maogou/pep-ebook | https://github.com/maogou/pep-ebook/blob/acf93c641bf749284bd65a9eb2116f86d4b8f07a/internal/bookmark/high_school/selective_compulsory/math_selective_compulsory/math_selective_compulsory.go | internal/bookmark/high_school/selective_compulsory/math_selective_compulsory/math_selective_compulsory.go | package math_selective_compulsory
import "github.com/pdfcpu/pdfcpu/pkg/pdfcpu"
var MathSelectiveCompulsoryFirstB = []pdfcpu.Bookmark{
{PageFrom: 1, Title: "封面"},
{PageFrom: 5, Title: "前言"},
{PageFrom: 7, Title: "目录"},
{PageFrom: 9, Title: "第一章: 空间向量与立体几何", Children: []pdfcpu.Bookmark{
{PageFrom: 10, Title: "本章导... | go | MIT | acf93c641bf749284bd65a9eb2116f86d4b8f07a | 2026-01-07T09:45:39.687802Z | false |
maogou/pep-ebook | https://github.com/maogou/pep-ebook/blob/acf93c641bf749284bd65a9eb2116f86d4b8f07a/internal/bookmark/middle_school/eighth_grade/math_eighth/math_eighth.go | internal/bookmark/middle_school/eighth_grade/math_eighth/math_eighth.go | package math_eighth
import "github.com/pdfcpu/pdfcpu/pkg/pdfcpu"
var Bms8_0 = []pdfcpu.Bookmark{
{PageFrom: 1, Title: "封面"},
{PageFrom: 5, Title: "本册引导"},
{PageFrom: 6, Title: "目录"},
{PageFrom: 9, Title: "第十一章: 三角形", Children: []pdfcpu.Bookmark{
{PageFrom: 10, Title: "11.1: 与三角形相关的线段", Children: []pdfcpu.Bookma... | go | MIT | acf93c641bf749284bd65a9eb2116f86d4b8f07a | 2026-01-07T09:45:39.687802Z | false |
maogou/pep-ebook | https://github.com/maogou/pep-ebook/blob/acf93c641bf749284bd65a9eb2116f86d4b8f07a/internal/bookmark/middle_school/seventh_grade/math_seventh/math_seventh.go | internal/bookmark/middle_school/seventh_grade/math_seventh/math_seventh.go | package math_seventh
import "github.com/pdfcpu/pdfcpu/pkg/pdfcpu"
var Bms7_0 = []pdfcpu.Bookmark{
{PageFrom: 1, Title: "封面"},
{PageFrom: 5, Title: "主编的话"},
{PageFrom: 7, Title: "目录"},
{PageFrom: 9, Title: "第一章: 有理数", Children: []pdfcpu.Bookmark{
{PageFrom: 10, Title: "1.1: 整数和负数"},
{PageFrom: 14, Title: "1.2:... | go | MIT | acf93c641bf749284bd65a9eb2116f86d4b8f07a | 2026-01-07T09:45:39.687802Z | false |
maogou/pep-ebook | https://github.com/maogou/pep-ebook/blob/acf93c641bf749284bd65a9eb2116f86d4b8f07a/internal/bookmark/middle_school/ninth_grade/math_ninth/math_ninth.go | internal/bookmark/middle_school/ninth_grade/math_ninth/math_ninth.go | package math_ninth
import "github.com/pdfcpu/pdfcpu/pkg/pdfcpu"
var Math9_0 = []pdfcpu.Bookmark{
{PageFrom: 1, Title: "封面"},
{PageFrom: 5, Title: "本册引导"},
{PageFrom: 6, Title: "目录"},
{PageFrom: 9, Title: "第二十一章: 一元二次方程", Children: []pdfcpu.Bookmark{
{PageFrom: 10, Title: "21.1: 一元二次方程"},
{PageFrom: 13, Title:... | go | MIT | acf93c641bf749284bd65a9eb2116f86d4b8f07a | 2026-01-07T09:45:39.687802Z | false |
maogou/pep-ebook | https://github.com/maogou/pep-ebook/blob/acf93c641bf749284bd65a9eb2116f86d4b8f07a/doc/demo.go | doc/demo.go | package doc
import (
"fmt"
"io"
"net/http"
"os"
"sort"
"time"
"github.com/pdfcpu/pdfcpu/pkg/api"
"github.com/pdfcpu/pdfcpu/pkg/pdfcpu"
"github.com/pdfcpu/pdfcpu/pkg/pdfcpu/model"
"github.com/pdfcpu/pdfcpu/pkg/pdfcpu/types"
)
func demo() {
var queryUrl string = "https://book.pep.com.cn/1321001101121/files... | go | MIT | acf93c641bf749284bd65a9eb2116f86d4b8f07a | 2026-01-07T09:45:39.687802Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/main.go | main.go | package main
import (
"context"
"errors"
"flag"
"fmt"
"gen/config"
"gen/log"
"gen/middleware"
"gen/model"
"gen/router"
"github.com/gin-gonic/gin"
"net/http"
"os"
"os/signal"
"syscall"
)
func main() {
var configFile string
flag.StringVar(&configFile, "conf", "app.ini", "config file path")
flag.Parse()... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/controller/base_controller.go | controller/base_controller.go | package controller
import (
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/go-playground/locales/en"
"github.com/go-playground/locales/zh"
ut "github.com/go-playground/universal-translator"
"github.com/go-playground/validator/v10"
zht "github.com/go-playground/validator/v10/translatio... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/controller/article_controller.go | controller/article_controller.go | package controller
import (
"gen/config"
"gen/log"
"gen/model"
"gen/service"
"github.com/gin-gonic/gin"
"strconv"
)
type articleController struct {
*Controller
*service.ArticleService
}
var ArticleController = articleController{
Controller: BaseController,
ArticleService: service.NewArticleService(),
}... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/util/const.go | util/const.go | package util
const (
TimeFormatYmd = "2006-01-02"
TimeFormatYmdHis = "2006-01-02 15:04:05"
)
| go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/util/func.go | util/func.go | package util
import (
"crypto/md5"
"crypto/sha1"
"encoding/hex"
"fmt"
"github.com/google/uuid"
"hash"
"io"
)
func MD5(str []byte) string {
h := md5.New()
h.Write(str)
return hex.EncodeToString(h.Sum(nil))
}
func Sha1(str []byte) string {
h := sha1.New()
h.Write(str)
return hex.EncodeToString(h.Sum(nil))... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/service/article_service.go | service/article_service.go | package service
import (
"context"
"fmt"
"gen/log"
. "gen/model"
)
type ArticleService struct{}
func NewArticleService() *ArticleService {
return &ArticleService{}
}
func (r ArticleService) GetAll(ctx context.Context, page, pageSize int) ([]*Article, int64, error) {
articles, totalCount, err := ArticleModel.G... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/model/comment.go | model/comment.go | package model
import "time"
type Comment struct {
Id int `json:"id" gorm:"primaryKey"`
ArticleId int `json:"article_id"`
Content string `json:"content"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at"`
}
func (... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/model/article.go | model/article.go | package model
import (
"context"
"gorm.io/gorm"
"time"
)
var ArticleModel = Article{}
type Article struct {
Id int `json:"id" gorm:"primaryKey"`
Title string `json:"title" binding:"min=1,max=100"`
Content string `json:"content" binding:"required"`
ViewNum int `json:"view_n... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/model/db.go | model/db.go | package model
import (
"context"
"fmt"
"gen/config"
"gen/log"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/logger"
"strings"
)
var (
connPool = make(map[string]*gorm.DB)
)
// NewOrm 默认返回default数据库连接
func NewOrm(ctx context.Context, dbName ...string) *gorm.DB {
conn := connPool["default"]
if len(dbN... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/middleware/add_trace.go | middleware/add_trace.go | package middleware
import (
"github.com/gin-gonic/gin"
"github.com/google/uuid"
)
func AddTrace() gin.HandlerFunc {
return func(context *gin.Context) {
traceId := context.Request.Header.Get("trace_id")
if traceId == "" {
traceId = uuid.NewString()
}
context.Set("trace_id", traceId)
context.Next()
}
}... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/middleware/access_log.go | middleware/access_log.go | package middleware
import (
"bytes"
"gen/log"
"github.com/gin-gonic/gin"
"go.uber.org/zap"
"io"
"time"
)
func AccessLog() gin.HandlerFunc {
return func(ctx *gin.Context) {
start := time.Now()
path := ctx.Request.URL.Path
raw := ctx.Request.URL.RawQuery
var reqBody []byte
if ctx.Request.Body != nil {
... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/config/config.go | config/config.go | package config
import (
"fmt"
"gopkg.in/ini.v1"
"os"
)
const (
Dev = "dev"
Prod = "prod"
Test = "test"
)
var cfg *App
func Get() *App {
return cfg
}
type App struct {
Env string
HttpPort string
LogFile string
LogConsole bool
LogLevel string
*ini.File
}
// Init 加载app.ini配置文件
func Init(... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/router/router.go | router/router.go | package router
import (
"gen/controller"
"github.com/gin-gonic/gin"
)
func RegisterRoutes(server *gin.Engine) {
server.GET("/", controller.BaseController.Index)
v1 := server.Group("/v1")
articleCtrl := controller.ArticleController
{
v1.GET("/articles", articleCtrl.GetAll) //所有文章
v1.POST("/articles",... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/log/gorm_logger.go | log/gorm_logger.go | package log
import (
"context"
"fmt"
"go.uber.org/zap"
"time"
gl "gorm.io/gorm/logger"
"gorm.io/gorm/utils"
)
type gormLogger struct {
gl.Config
infoStr, warnStr, errStr string
traceStr, traceErrStr, traceWarnStr string
}
// NewGormLogger 包含traceId信息的sql日志
func NewGormLogger(config gl.Config) gl... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
wangbjun/gen | https://github.com/wangbjun/gen/blob/e25d318c5488079e1aa5b5639b43865aac5cb0f3/log/logger.go | log/logger.go | package log
import (
"context"
"fmt"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"os"
"gen/config"
)
var zapLogger *zap.Logger
type Logger struct {
context.Context
*zap.Logger
}
// WithCtx 带请求上下文的Logger,可以记录一些额外信息,比如traceId
func WithCtx(ctx context.Context) *Logger {
return &Logger{ctx, zapLogger}
}
func... | go | Apache-2.0 | e25d318c5488079e1aa5b5639b43865aac5cb0f3 | 2026-01-07T09:45:58.104928Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/main.go | main.go | package main
import (
"fmt"
"github.com/erikvanbrakel/anthology/api/v1"
"github.com/erikvanbrakel/anthology/app"
"github.com/erikvanbrakel/anthology/registry"
"github.com/erikvanbrakel/anthology/services"
"github.com/go-ozzo/ozzo-routing"
"github.com/go-ozzo/ozzo-routing/content"
"github.com/sirupsen/logrus"
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/services/module.go | services/module.go | package services
import (
"github.com/erikvanbrakel/anthology/app"
"github.com/erikvanbrakel/anthology/models"
"github.com/erikvanbrakel/anthology/registry"
"io"
)
type ModuleService struct {
Registry registry.Registry
}
func NewModuleService(r registry.Registry) *ModuleService {
return &ModuleService{
r,
}... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/app/init.go | app/init.go | package app
import (
"fmt"
"github.com/go-ozzo/ozzo-routing"
"github.com/go-ozzo/ozzo-routing/access"
"github.com/go-ozzo/ozzo-routing/fault"
"github.com/sirupsen/logrus"
"net/http"
"time"
)
func Init(logger *logrus.Logger) routing.Handler {
return func(rc *routing.Context) error {
now := time.Now()
rc.Re... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/app/config.go | app/config.go | package app
import (
"github.com/jessevdk/go-flags"
"github.com/sirupsen/logrus"
"os"
)
var Config = &CommonOptions{}
type CommonOptions struct {
Port int `short:"p" long:"port" description:"Port the service listens on" default:"8080"`
Backend string `short:"b" long:"backend" c... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/app/scope.go | app/scope.go | package app
import (
"github.com/sirupsen/logrus"
"net/http"
"time"
)
type RequestScope interface {
Logger
Now() time.Time
}
type requestScope struct {
Logger
now time.Time
requestID string
}
func newRequestScope(now time.Time, logger *logrus.Logger, request *http.Request) RequestScope {
log := NewLo... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/app/version.go | app/version.go | package app
var Version = "1.0"
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/app/logger.go | app/logger.go | package app
import "github.com/sirupsen/logrus"
type Logger interface {
SetField(name, value string)
Debugf(format string, args ...interface{})
Infof(format string, args ...interface{})
Warnf(format string, args ...interface{})
Errorf(format string, args ...interface{})
Debug(args ...interface{})
Info(args ..... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/require/requirements_test.go | vendor/github.com/stretchr/testify/require/requirements_test.go | package require
import (
"encoding/json"
"errors"
"testing"
"time"
)
// AssertionTesterInterface defines an interface to be used for testing assertion methods
type AssertionTesterInterface interface {
TestMethod()
}
// AssertionTesterConformingObject is an object that conforms to the AssertionTesterInterface in... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/require/require_forward.go | vendor/github.com/stretchr/testify/require/require_forward.go | /*
* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
* THIS FILE MUST NOT BE EDITED BY HAND
*/
package require
import (
assert "github.com/stretchr/testify/assert"
http "net/http"
url "net/url"
time "time"
)
// Condition uses a Comparison to assert a complex condition.
func (a *Assertions... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/require/requirements.go | vendor/github.com/stretchr/testify/require/requirements.go | package require
// TestingT is an interface wrapper around *testing.T
type TestingT interface {
Errorf(format string, args ...interface{})
FailNow()
}
type tHelper interface {
Helper()
}
// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful
// for table driven tests.
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/require/forward_requirements.go | vendor/github.com/stretchr/testify/require/forward_requirements.go | package require
// Assertions provides assertion methods around the
// TestingT interface.
type Assertions struct {
t TestingT
}
// New makes a new Assertions object for the specified TestingT.
func New(t TestingT) *Assertions {
return &Assertions{
t: t,
}
}
//go:generate go run ../_codegen/main.go -output-pack... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/require/require.go | vendor/github.com/stretchr/testify/require/require.go | /*
* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
* THIS FILE MUST NOT BE EDITED BY HAND
*/
package require
import (
assert "github.com/stretchr/testify/assert"
http "net/http"
url "net/url"
time "time"
)
// Condition uses a Comparison to assert a complex condition.
func Condition(t Te... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/require/doc.go | vendor/github.com/stretchr/testify/require/doc.go | // Package require implements the same assertions as the `assert` package but
// stops test execution when a test fails.
//
// Example Usage
//
// The following is a complete example using require in a standard test function:
// import (
// "testing"
// "github.com/stretchr/testify/require"
// )
//
// ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/require/forward_requirements_test.go | vendor/github.com/stretchr/testify/require/forward_requirements_test.go | package require
import (
"errors"
"testing"
"time"
)
func TestImplementsWrapper(t *testing.T) {
require := New(t)
require.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject))
mockT := new(MockT)
mockRequire := New(mockT)
mockRequire.Implements((*AssertionTesterInterface)(nil), ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/assertion_format.go | vendor/github.com/stretchr/testify/assert/assertion_format.go | /*
* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
* THIS FILE MUST NOT BE EDITED BY HAND
*/
package assert
import (
http "net/http"
url "net/url"
time "time"
)
// Conditionf uses a Comparison to assert a complex condition.
func Conditionf(t TestingT, comp Comparison, msg string, args ..... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/forward_assertions_test.go | vendor/github.com/stretchr/testify/assert/forward_assertions_test.go | package assert
import (
"errors"
"regexp"
"testing"
"time"
)
func TestImplementsWrapper(t *testing.T) {
assert := New(new(testing.T))
if !assert.Implements((*AssertionTesterInterface)(nil), new(AssertionTesterConformingObject)) {
t.Error("Implements method should return true: AssertionTesterConformingObject ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/assertion_forward.go | vendor/github.com/stretchr/testify/assert/assertion_forward.go | /*
* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
* THIS FILE MUST NOT BE EDITED BY HAND
*/
package assert
import (
http "net/http"
url "net/url"
time "time"
)
// Condition uses a Comparison to assert a complex condition.
func (a *Assertions) Condition(comp Comparison, msgAndArgs ...int... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/forward_assertions.go | vendor/github.com/stretchr/testify/assert/forward_assertions.go | package assert
// Assertions provides assertion methods around the
// TestingT interface.
type Assertions struct {
t TestingT
}
// New makes a new Assertions object for the specified TestingT.
func New(t TestingT) *Assertions {
return &Assertions{
t: t,
}
}
//go:generate go run ../_codegen/main.go -output-packa... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/errors.go | vendor/github.com/stretchr/testify/assert/errors.go | package assert
import (
"errors"
)
// AnError is an error instance useful for testing. If the code does not care
// about error specifics, and only needs to return the error for example, this
// error should be used to make the test code more readable.
var AnError = errors.New("assert.AnError general error for test... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/assertions_test.go | vendor/github.com/stretchr/testify/assert/assertions_test.go | package assert
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"math"
"os"
"reflect"
"regexp"
"runtime"
"strings"
"testing"
"time"
)
var (
i interface{}
zeros = []interface{}{
false,
byte(0),
complex64(0),
complex128(0),
float32(0),
float64(0),
int(0),
int8(0),
int16(0),
in... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/http_assertions_test.go | vendor/github.com/stretchr/testify/assert/http_assertions_test.go | package assert
import (
"fmt"
"net/http"
"net/url"
"testing"
)
func httpOK(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}
func httpRedirect(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusTemporaryRedirect)
}
func httpError(w http.ResponseWriter, r *http.Request) {... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/assertions.go | vendor/github.com/stretchr/testify/assert/assertions.go | package assert
import (
"bufio"
"bytes"
"encoding/json"
"errors"
"fmt"
"math"
"os"
"reflect"
"regexp"
"runtime"
"strings"
"time"
"unicode"
"unicode/utf8"
"github.com/davecgh/go-spew/spew"
"github.com/pmezard/go-difflib/difflib"
)
//go:generate go run ../_codegen/main.go -output-package=assert -templa... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/doc.go | vendor/github.com/stretchr/testify/assert/doc.go | // Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
//
// Example Usage
//
// The following is a complete example using assert in a standard test function:
// import (
// "testing"
// "github.com/stretchr/testify/assert"
// )
//
// func TestSomet... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/stretchr/testify/assert/http_assertions.go | vendor/github.com/stretchr/testify/assert/http_assertions.go | package assert
import (
"fmt"
"net/http"
"net/http/httptest"
"net/url"
"strings"
)
// httpCode is a helper that returns HTTP code of the response. It returns -1 and
// an error if building a new request fails.
func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) {
w := htt... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/yalp/jsonpath/jsonpath.go | vendor/github.com/yalp/jsonpath/jsonpath.go | // Package jsonpath implements Stefan Goener's JSONPath http://goessner.net/articles/JsonPath/
//
// A jsonpath applies to any JSON decoded data using interface{} when
// decoded with encoding/json (http://golang.org/pkg/encoding/json/) :
//
// var bookstore interface{}
// err := json.Unmarshal(data, &bookstore)
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/yalp/jsonpath/example_test.go | vendor/github.com/yalp/jsonpath/example_test.go | package jsonpath_test
import (
"encoding/json"
"fmt"
"github.com/yalp/jsonpath"
)
func ExampleRead() {
raw := []byte(`{"hello":"world"}`)
var data interface{}
json.Unmarshal(raw, &data)
out, err := jsonpath.Read(data, "$.hello")
if err != nil {
panic(err)
}
fmt.Print(out)
// Output: world
}
func Exa... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/yalp/jsonpath/jsonpath_test.go | vendor/github.com/yalp/jsonpath/jsonpath_test.go | package jsonpath
import (
"encoding/json"
"reflect"
"strings"
"testing"
)
var goessner = []byte(`{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/section_test.go | vendor/github.com/go-ini/ini/section_test.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/parser.go | vendor/github.com/go-ini/ini/parser.go | // Copyright 2015 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/key_test.go | vendor/github.com/go-ini/ini/key_test.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/ini_internal_test.go | vendor/github.com/go-ini/ini/ini_internal_test.go | // Copyright 2017 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/file.go | vendor/github.com/go-ini/ini/file.go | // Copyright 2017 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/error.go | vendor/github.com/go-ini/ini/error.go | // Copyright 2016 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/struct.go | vendor/github.com/go-ini/ini/struct.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/struct_test.go | vendor/github.com/go-ini/ini/struct_test.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/file_test.go | vendor/github.com/go-ini/ini/file_test.go | // Copyright 2017 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/parser_test.go | vendor/github.com/go-ini/ini/parser_test.go | // Copyright 2016 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/ini_test.go | vendor/github.com/go-ini/ini/ini_test.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/ini.go | vendor/github.com/go-ini/ini/ini.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/bench_test.go | vendor/github.com/go-ini/ini/bench_test.go | // Copyright 2017 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/section.go | vendor/github.com/go-ini/ini/section.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/go-ini/ini/key.go | vendor/github.com/go-ini/ini/key.go | // Copyright 2014 Unknwon
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/json.go | vendor/github.com/blang/semver/json.go | package semver
import (
"encoding/json"
)
// MarshalJSON implements the encoding/json.Marshaler interface.
func (v Version) MarshalJSON() ([]byte, error) {
return json.Marshal(v.String())
}
// UnmarshalJSON implements the encoding/json.Unmarshaler interface.
func (v *Version) UnmarshalJSON(data []byte) (err error)... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/range_test.go | vendor/github.com/blang/semver/range_test.go | package semver
import (
"reflect"
"strings"
"testing"
)
type wildcardTypeTest struct {
input string
wildcardType wildcardType
}
type comparatorTest struct {
input string
comparator func(comparator) bool
}
func TestParseComparator(t *testing.T) {
compatorTests := []comparatorTest{
{">", testGT}... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/sort.go | vendor/github.com/blang/semver/sort.go | package semver
import (
"sort"
)
// Versions represents multiple versions.
type Versions []Version
// Len returns length of version collection
func (s Versions) Len() int {
return len(s)
}
// Swap swaps two versions inside the collection by its indices
func (s Versions) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/json_test.go | vendor/github.com/blang/semver/json_test.go | package semver
import (
"encoding/json"
"strconv"
"testing"
)
func TestJSONMarshal(t *testing.T) {
versionString := "3.1.4-alpha.1.5.9+build.2.6.5"
v, err := Parse(versionString)
if err != nil {
t.Fatal(err)
}
versionJSON, err := json.Marshal(v)
if err != nil {
t.Fatal(err)
}
quotedVersionString := s... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/semver_test.go | vendor/github.com/blang/semver/semver_test.go | package semver
import (
"testing"
)
func prstr(s string) PRVersion {
return PRVersion{s, 0, false}
}
func prnum(i uint64) PRVersion {
return PRVersion{"", i, true}
}
type formatTest struct {
v Version
result string
}
var formatTests = []formatTest{
{Version{1, 2, 3, nil, nil}, "1.2.3"},
{Version{0, 0, ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/sql.go | vendor/github.com/blang/semver/sql.go | package semver
import (
"database/sql/driver"
"fmt"
)
// Scan implements the database/sql.Scanner interface.
func (v *Version) Scan(src interface{}) (err error) {
var str string
switch src := src.(type) {
case string:
str = src
case []byte:
str = string(src)
default:
return fmt.Errorf("Version.Scan: cann... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/sql_test.go | vendor/github.com/blang/semver/sql_test.go | package semver
import (
"testing"
)
type scanTest struct {
val interface{}
shouldError bool
expected string
}
var scanTests = []scanTest{
{"1.2.3", false, "1.2.3"},
{[]byte("1.2.3"), false, "1.2.3"},
{7, true, ""},
{7e4, true, ""},
{true, true, ""},
}
func TestScanString(t *testing.T) {
for _, ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/range.go | vendor/github.com/blang/semver/range.go | package semver
import (
"fmt"
"strconv"
"strings"
"unicode"
)
type wildcardType int
const (
noneWildcard wildcardType = iota
majorWildcard wildcardType = 1
minorWildcard wildcardType = 2
patchWildcard wildcardType = 3
)
func wildcardTypefromInt(i int) wildcardType {
switch i {
case 1:
return majorWildc... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/semver.go | vendor/github.com/blang/semver/semver.go | package semver
import (
"errors"
"fmt"
"strconv"
"strings"
)
const (
numbers string = "0123456789"
alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"
alphanum = alphas + numbers
)
// SpecVersion is the latest fully supported spec version of semver
var SpecVersion = Version{
Maj... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/blang/semver/sort_test.go | vendor/github.com/blang/semver/sort_test.go | package semver
import (
"reflect"
"testing"
)
func TestSort(t *testing.T) {
v100, _ := Parse("1.0.0")
v010, _ := Parse("0.1.0")
v001, _ := Parse("0.0.1")
versions := []Version{v010, v100, v001}
Sort(versions)
correct := []Version{v001, v010, v100}
if !reflect.DeepEqual(versions, correct) {
t.Fatalf("Sort ... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/match.go | vendor/github.com/sergi/go-diff/diffmatchpatch/match.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/patch_test.go | vendor/github.com/sergi/go-diff/diffmatchpatch/patch_test.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/operation_string.go | vendor/github.com/sergi/go-diff/diffmatchpatch/operation_string.go | // Code generated by "stringer -type=Operation -trimprefix=Diff"; DO NOT EDIT.
package diffmatchpatch
import "fmt"
const _Operation_name = "DeleteEqualInsert"
var _Operation_index = [...]uint8{0, 6, 11, 17}
func (i Operation) String() string {
i -= -1
if i < 0 || i >= Operation(len(_Operation_index)-1) {
retur... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/match_test.go | vendor/github.com/sergi/go-diff/diffmatchpatch/match_test.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/diffmatchpatch.go | vendor/github.com/sergi/go-diff/diffmatchpatch/diffmatchpatch.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/mathutil.go | vendor/github.com/sergi/go-diff/diffmatchpatch/mathutil.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go | vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil_test.go | vendor/github.com/sergi/go-diff/diffmatchpatch/stringutil_test.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go | vendor/github.com/sergi/go-diff/diffmatchpatch/diff.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/benchutil_test.go | vendor/github.com/sergi/go-diff/diffmatchpatch/benchutil_test.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/patch.go | vendor/github.com/sergi/go-diff/diffmatchpatch/patch.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/sergi/go-diff/diffmatchpatch/diff_test.go | vendor/github.com/sergi/go-diff/diffmatchpatch/diff_test.go | // Copyright (c) 2012-2016 The go-diff authors. All rights reserved.
// https://github.com/sergi/go-diff
// See the included LICENSE file for license details.
//
// go-diff is a Go implementation of Google's Diff, Match, and Patch library
// Original library is Copyright (c) 2006 Google Inc.
// http://code.google.com/p... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/retryer_test.go | vendor/github.com/aws/aws-sdk-go/service/ec2/retryer_test.go | package ec2
import (
"testing"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/awstesting/unit"
)
func TestCustomRetryer(t *testing.T) {
svc := New(unit.Session, &aws.Config{Region: aws.String("us-west-2")})
if _, ok := svc.Client.Retryer.(retryer); !ok... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go | vendor/github.com/aws/aws-sdk-go/service/ec2/api.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/ec2que... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/examples_test.go | vendor/github.com/aws/aws-sdk-go/service/ec2/examples_test.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2_test
import (
"fmt"
"strings"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
)
var _ time.Duration
var _ strings.Read... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/service.go | vendor/github.com/aws/aws-sdk-go/service/ec2/service.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-s... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go | vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
)
// WaitUntilBundleTaskComplete uses the Amazon EC2 API operation
// DescribeBundleTasks to wait for a condition to be met before returning.
//... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go | vendor/github.com/aws/aws-sdk-go/service/ec2/errors.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ec2
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go | vendor/github.com/aws/aws-sdk-go/service/ec2/customizations_test.go | package ec2_test
import (
"io/ioutil"
"net/url"
"regexp"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/ec2"
)
func TestCopySnapshotPresignedURL(t *testing.T) {
svc := ec2.New(unit.Session, &aws.Config{Region: aws.String("us-west-2")})... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go | vendor/github.com/aws/aws-sdk-go/service/ec2/customizations.go | package ec2
import (
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/endpoints"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/internal/sdkrand"
)
type retryer struct {
client.DefaultRetry... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go | vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package ec2 provides the client and types for making API
// requests to Amazon Elastic Compute Cloud.
//
// Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity
// in the AWS Cloud. Using Amazon EC2 eliminates the need t... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/sqs/checksums_test.go | vendor/github.com/aws/aws-sdk-go/service/sqs/checksums_test.go | package sqs_test
import (
"bytes"
"io/ioutil"
"net/http"
"strings"
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/sqs"
)
var svc = func() *sqs.SQS {
s :=... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/sqs/api.go | vendor/github.com/aws/aws-sdk-go/service/sqs/api.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sqs
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/query"
)
cons... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | true |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/sqs/service.go | vendor/github.com/aws/aws-sdk-go/service/sqs/service.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sqs
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/signer/v4"
"github.com/aws/aws-s... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go | vendor/github.com/aws/aws-sdk-go/service/sqs/errors.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package sqs
const (
// ErrCodeBatchEntryIdsNotDistinct for service response error code
// "AWS.SimpleQueueService.BatchEntryIdsNotDistinct".
//
// Two or more batch entries in the request have the same Id.
ErrCodeBatchEntryIdsNotDistinct = "AW... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/sqs/api_test.go | vendor/github.com/aws/aws-sdk-go/service/sqs/api_test.go | // +build integration
package sqs_test
import (
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/awstesting/unit"
"github.com/aws/aws-sdk-go/service/sqs"
)
func TestFlattenedTraits(t *testing.T) {
s := sqs.New(unit.Session)
_, err := s.DeleteMessageBatch(&sqs.DeleteMessageBatchInput{
Que... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/sqs/customizations.go | vendor/github.com/aws/aws-sdk-go/service/sqs/customizations.go | package sqs
import "github.com/aws/aws-sdk-go/aws/request"
func init() {
initRequest = func(r *request.Request) {
setupChecksumValidation(r)
}
}
| go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
erikvanbrakel/anthology | https://github.com/erikvanbrakel/anthology/blob/c715d868faa4799678792337e5f86725ceffd797/vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go | vendor/github.com/aws/aws-sdk-go/service/sqs/doc.go | // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package sqs provides the client and types for making API
// requests to Amazon Simple Queue Service.
//
// Welcome to the Amazon Simple Queue Service API Reference.
//
// Amazon Simple Queue Service (Amazon SQS) is a reliable, highly-scalable host... | go | MIT | c715d868faa4799678792337e5f86725ceffd797 | 2026-01-07T09:45:51.510322Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.