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
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/comment.go
internal/database/comment.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "strings" "time" "github.com/unknwon/com" log "unknwon.dev/clog/v2" "xorm.io/xorm" api "github.com/gogs/g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/backup_test.go
internal/database/backup_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "bytes" "context" "os" "path/filepath" "testing" "time" "github.com/pkg/errors" "github.com/stretchr/testify/require" "go...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repositories_test.go
internal/database/repositories_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gorm.io/gorm" "gogs...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/organizations_test.go
internal/database/organizations_test.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gogs.io/gogs/internal/dbutil...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/milestone.go
internal/database/milestone.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "time" log "unknwon.dev/clog/v2" "xorm.io/xorm" api "github.com/gogs/go-gogs-client" "gogs.io/gogs/internal/conf" "...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/access_tokens.go
internal/database/access_tokens.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "time" "github.com/pkg/errors" gouuid "github.com/satori/go.uuid" "gorm.io/gorm" "gogs.io/gogs/internal/cr...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/lfs_test.go
internal/database/lfs_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gogs.io/gogs/interna...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/models.go
internal/database/models.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "database/sql" "fmt" "os" "path" "path/filepath" "strings" "time" "github.com/pkg/errors" "gorm.io/gorm" "gor...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repo_tag.go
internal/database/repo_tag.go
// Copyright 2021 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "github.com/gogs/git-module" ) type Tag struct { RepoPath string Name string IsProtected bool Commit *git.C...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/webhook.go
internal/database/webhook.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "crypto/hmac" "crypto/sha256" "crypto/tls" "encoding/hex" "fmt" "io" "net/url" "strings" "time" jsoniter "github.com/jso...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/mirror.go
internal/database/mirror.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "net/url" "strings" "time" "github.com/unknwon/com" "gopkg.in/ini.v1" log "unknwon.dev/clog/v2" "xorm.io/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/users_test.go
internal/database/users_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "os" "path/filepath" "strings" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
true
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/error.go
internal/database/error.go
// Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" ) // __ __.__ __ .__ // / \ / \__| | _|__| // \ \/\/ / | |/ / | // \ /| | <| | // \__/\...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/notices_test.go
internal/database/notices_test.go
// Copyright 2023 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gorm.io/gorm" ) func...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/issue_mail.go
internal/database/issue_mail.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "github.com/pkg/errors" "github.com/unknwon/com" log "unknwon.dev/clog/v2" "gogs.io/gogs/internal/conf" "g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/ssh_key_test.go
internal/database/ssh_key_test.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "testing" "github.com/stretchr/testify/assert" "gogs.io/gogs/internal/conf" ) func Test_SSHParsePublicKey(t *testing.T) { //...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/webhook_slack.go
internal/database/webhook_slack.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "strings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/gogs/git-module" api "github.com...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/two_factors_test.go
internal/database/two_factors_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gorm.io/gorm" "gogs...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/attachment.go
internal/database/attachment.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "io" "mime/multipart" "os" "path" "time" gouuid "github.com/satori/go.uuid" "xorm.io/xorm" "gogs.io/gogs/internal/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/ssh_key.go
internal/database/ssh_key.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "encoding/base64" "encoding/binary" "errors" "fmt" "math/big" "os" "path" "path/filepath" "strings" "sync" "t...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repo_collaboration.go
internal/database/repo_collaboration.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" log "unknwon.dev/clog/v2" api "github.com/gogs/go-gogs-client" ) // Collaboration represent the relation between an ind...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/permissions_test.go
internal/database/permissions_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestPerms(t *testing.T)...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/login_source_files.go
internal/database/login_source_files.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "os" "path/filepath" "strings" "sync" "time" "github.com/pkg/errors" "gopkg.in/ini.v1" "gogs.io/gogs/internal/auth...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/main_test.go
internal/database/main_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "flag" "fmt" "os" "testing" "gorm.io/gorm" "gorm.io/gorm/logger" _ "modernc.org/sqlite" log "unknwon.dev/clog/v2" "gogs....
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/database.go
internal/database/database.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "path/filepath" "strings" "time" "github.com/pkg/errors" "gorm.io/gorm" "gorm.io/gorm/logger" "gorm.io/gorm/schema" ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/release.go
internal/database/release.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "sort" "strings" "time" log "unknwon.dev/clog/v2" "xorm.io/xorm" "github.com/gogs/git-module" api "github.com/gogs/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/issue.go
internal/database/issue.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "strings" "time" "github.com/unknwon/com" log "unknwon.dev/clog/v2" "xorm.io/xorm" api "github.com/gogs/g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
true
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/public_keys_test.go
internal/database/public_keys_test.go
// Copyright 2023 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "os" "path/filepath" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/login_sources.go
internal/database/login_sources.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "strconv" "time" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "gorm.io/gorm" "gogs.io/g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/org_team.go
internal/database/org_team.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "strings" "xorm.io/xorm" "gogs.io/gogs/internal/database/errors" "gogs.io/gogs/internal/errutil" ) const o...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/mocks_test.go
internal/database/mocks_test.go
// Code generated by go-mockgen 2.1.1; DO NOT EDIT. // // This file was generated by running `go-mockgen` at the root of this repository. // To add additional mocks to this or another package, add a new entry to the // mockgen.yaml file in the root of this repository. package database import "sync" // MockLoginSourc...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/login_source_files_test.go
internal/database/login_source_files_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gogs.io/gogs/internal/errutil" ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/wiki.go
internal/database/wiki.go
// Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "net/url" "os" "path" "path/filepath" "strings" "time" "github.com/unknwon/com" "github.com/gogs/git-module" "go...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/two_factors.go
internal/database/two_factors.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "encoding/base64" "fmt" "strings" "time" "github.com/pkg/errors" "gorm.io/gorm" log "unknwon.dev/clog/v2" "gog...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/webhook_dingtalk.go
internal/database/webhook_dingtalk.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "strings" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/gogs/git-module" api "github.com...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repo.go
internal/database/repo.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "bytes" "context" "fmt" "image" _ "image/jpeg" "image/png" "os" "os/exec" "path" "path/filepath" "sort" "strings" "tim...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
true
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repo_editor_test.go
internal/database/repo_editor_test.go
// Copyright 2018 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "testing" "github.com/stretchr/testify/assert" ) func TestIsRepositoryGitPath(t *testing.T) { tests := []struct { path st...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/backup.go
internal/database/backup.go
package database import ( "bufio" "bytes" "context" "fmt" "io" "os" "path/filepath" "reflect" "strings" "sync" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "gorm.io/gorm" "gorm.io/gorm/schema" log "unknwon.dev/clog/v2" "xorm.io/core" "xorm.io/xorm" "gogs.io/gogs/internal/conf" "g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/two_factor.go
internal/database/two_factor.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "encoding/base64" "fmt" "time" "github.com/pquerna/otp/totp" "github.com/unknwon/com" "gogs.io/gogs/internal/conf" "gogs.i...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/mocks_gen.go
internal/database/mocks_gen.go
// Code generated by go-mockgen 2.1.1; DO NOT EDIT. // // This file was generated by running `go-mockgen` at the root of this repository. // To add additional mocks to this or another package, add a new entry to the // mockgen.yaml file in the root of this repository. package database import ( "sync" auth "gogs.io...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/public_keys.go
internal/database/public_keys.go
// Copyright 2023 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "os" "path/filepath" "github.com/pkg/errors" "gorm.io/gorm" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/osutil" ) ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repo_test.go
internal/database/repo_test.go
package database import ( "testing" "github.com/stretchr/testify/assert" "gogs.io/gogs/internal/markup" ) func TestRepository_ComposeMetas(t *testing.T) { repo := &Repository{ Name: "testrepo", Owner: &User{ Name: "testuser", }, ExternalTrackerFormat: "https://someurl.com/{user}/{repo}/{issue}", } ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/pull.go
internal/database/pull.go
// Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "os" "path/filepath" "time" "github.com/unknwon/com" log "unknwon.dev/clog/v2" "xorm.io/xorm" "github.co...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/login_sources_test.go
internal/database/login_sources_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "time" mockrequire "github.com/derision-test/go-mockgen/v2/testutil/require" "github.com/stretchr/testify...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/issue_label.go
internal/database/issue_label.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "fmt" "html/template" "strconv" "strings" "xorm.io/xorm" api "github.com/gogs/go-gogs-client" "gogs.io/gogs/internal/erru...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/notices.go
internal/database/notices.go
// Copyright 2023 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "os" "strconv" "time" "gorm.io/gorm" log "unknwon.dev/clog/v2" ) // NoticesStore is the storage layer for ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repo_branch.go
internal/database/repo_branch.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "strings" "github.com/gogs/git-module" "github.com/unknwon/com" "gogs.io/gogs/internal/errutil" "gogs.io/g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/repositories.go
internal/database/repositories.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "strings" "time" api "github.com/gogs/go-gogs-client" "github.com/pkg/errors" "gorm.io/gorm" "gogs.io/gog...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/users.go
internal/database/users.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "database/sql" "fmt" "os" "strings" "time" "unicode/utf8" "github.com/go-macaron/binding" api "github.com/gogs/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
true
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/update.go
internal/database/update.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "fmt" "os/exec" "strings" "github.com/gogs/git-module" "github.com/pkg/errors" ) // CommitToPushCommit transforms...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/mirror_test.go
internal/database/mirror_test.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "testing" "github.com/stretchr/testify/assert" ) func Test_parseRemoteUpdateOutput(t *testing.T) { tests := []struct { outpu...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/org.go
internal/database/org.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "errors" "fmt" "os" "strings" "xorm.io/builder" "xorm.io/xorm" "gogs.io/gogs/internal/errutil" "gogs.io/gogs/i...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/permissions.go
internal/database/permissions.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "github.com/pkg/errors" "gorm.io/gorm" log "unknwon.dev/clog/v2" ) // Access represents the highest access level of...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/access_tokens_test.go
internal/database/access_tokens_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package database import ( "context" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gorm.io/gorm" "gogs...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/errors/errors.go
internal/database/errors/errors.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package errors import "errors" var ErrInternalServerError = errors.New("internal server error") // New is a wrapper of real errors.New function. func New(t...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/errors/repo.go
internal/database/errors/repo.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package errors import ( "fmt" ) type InvalidRepoReference struct { Ref string } func IsInvalidRepoReference(err error) bool { _, ok := err.(InvalidRepoR...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/migrations/v20.go
internal/database/migrations/v20.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package migrations import ( "github.com/pkg/errors" "gorm.io/gorm" "gogs.io/gogs/internal/cryptoutil" ) func migrateAccessTokenToSHA256(db *gorm.DB) err...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/migrations/v21_test.go
internal/database/migrations/v21_test.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package migrations import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gogs.io/gogs/internal/dbtest" ) type...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/migrations/migrations.go
internal/database/migrations/migrations.go
// Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package migrations import ( "github.com/pkg/errors" "gorm.io/gorm" log "unknwon.dev/clog/v2" ) const minDBVersion = 19 type Migration interface { Descr...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/migrations/main_test.go
internal/database/migrations/main_test.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package migrations import ( "flag" "fmt" "os" "testing" "gorm.io/gorm/logger" _ "modernc.org/sqlite" log "unknwon.dev/clog/v2" "gogs.io/gogs/intern...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/migrations/v20_test.go
internal/database/migrations/v20_test.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package migrations import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gogs.io/gogs/internal/dbtest" ) type...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/migrations/v21.go
internal/database/migrations/v21.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package migrations import ( "gorm.io/gorm" ) func addIndexToActionUserID(db *gorm.DB) error { type action struct { UserID string `gorm:"index"` } if d...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/database/schemadoc/main.go
internal/database/schemadoc/main.go
package main import ( "fmt" "log" "os" "sort" "strings" "github.com/olekukonko/tablewriter" "github.com/pkg/errors" "gopkg.in/DATA-DOG/go-sqlmock.v2" "gorm.io/driver/mysql" "gorm.io/driver/postgres" "gorm.io/driver/sqlite" "gorm.io/gorm" "gorm.io/gorm/clause" "gorm.io/gorm/schema" "gogs.io/gogs/intern...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/testutil/exec.go
internal/testutil/exec.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package testutil import ( "errors" "fmt" "os" "os/exec" "strings" ) // Exec executes "go test" on given helper with supplied environment variables. // ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/testutil/golden.go
internal/testutil/golden.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package testutil import ( "encoding/json" "flag" "os" "path/filepath" "regexp" "runtime" "testing" "github.com/stretchr/testify/assert" ) var updat...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/testutil/testutil_test.go
internal/testutil/testutil_test.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package testutil import ( "testing" "github.com/stretchr/testify/assert" ) func TestInTest(t *testing.T) { assert.True(t, InTest) }
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/testutil/exec_test.go
internal/testutil/exec_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package testutil import ( "errors" "fmt" "os" "testing" "github.com/stretchr/testify/assert" ) func TestExecHelper(_ *testing.T) { if !WantHelperProc...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/testutil/noop_logger.go
internal/testutil/noop_logger.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package testutil import ( log "unknwon.dev/clog/v2" ) var _ log.Logger = (*noopLogger)(nil) // noopLogger is a placeholder logger that logs nothing. type ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/testutil/golden_test.go
internal/testutil/golden_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package testutil import ( "path/filepath" "testing" "github.com/stretchr/testify/assert" ) func TestUpdate(t *testing.T) { before := updateRegex defer...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/testutil/testutil.go
internal/testutil/testutil.go
// Copyright 2022 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package testutil import ( "os" "strings" ) // InTest is ture if the current binary looks like a test artifact. var InTest = len(os.Args) > 0 && strings.Ha...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/form/form.go
internal/form/form.go
// Copyright 2017 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package form import ( "fmt" "reflect" "strings" "github.com/go-macaron/binding" "github.com/unknwon/com" "gopkg.in/macaron.v1" "gogs.io/gogs/interna...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/form/admin.go
internal/form/admin.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package form import ( "github.com/go-macaron/binding" "gopkg.in/macaron.v1" ) type AdminCrateUser struct { LoginType string `binding:"Required"` LoginN...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/form/repo.go
internal/form/repo.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package form import ( "net/url" "strings" "github.com/go-macaron/binding" "github.com/unknwon/com" "gopkg.in/macaron.v1" "gogs.io/gogs/internal/conf"...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/form/auth.go
internal/form/auth.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package form import ( "github.com/go-macaron/binding" "gopkg.in/macaron.v1" ) type Authentication struct { ID int64 Type int...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/form/user.go
internal/form/user.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package form import ( "mime/multipart" "github.com/go-macaron/binding" "gopkg.in/macaron.v1" ) //nolint:staticcheck // Reason: needed for legacy code ty...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/form/org.go
internal/form/org.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package form import ( "github.com/go-macaron/binding" "gopkg.in/macaron.v1" ) type CreateOrg struct { OrgName string `binding:"Required;AlphaDashDot;MaxS...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/httplib/httplib.go
internal/httplib/httplib.go
// Copyright 2013 The Beego Authors. All rights reserved. // Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package httplib import ( "bytes" "context" "crypto/tls" "io" "log" "mime/multipart" "net" "...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/static.go
internal/conf/static.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "net/url" "os" "time" "github.com/gogs/go-libravatar" ) // ℹ️ README: This file contains static values that should only be set at...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/mocks.go
internal/conf/mocks.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "sync" "testing" ) func SetMockApp(t *testing.T, opts AppOpts) { before := App App = opts t.Cleanup(func() { App = before }) }...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/computed_test.go
internal/conf/computed_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "fmt" "os" "testing" "github.com/stretchr/testify/assert" "gogs.io/gogs/internal/testutil" ) func TestIsProdMode(t *testing.T) ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/log_test.go
internal/conf/log_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "path/filepath" "testing" "github.com/stretchr/testify/assert" "gopkg.in/ini.v1" log "unknwon.dev/clog/v2" ) func Test_initLogCo...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/utils.go
internal/conf/utils.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "path/filepath" "strings" "github.com/pkg/errors" "gogs.io/gogs/internal/osutil" "gogs.io/gogs/internal/process" ) // cleanUpOp...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/conf.go
internal/conf/conf.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "fmt" "net/mail" "net/url" "os" "path/filepath" "strconv" "strings" "time" _ "github.com/go-macaron/cache/memcache" _ "githu...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/static_minwinsvc.go
internal/conf/static_minwinsvc.go
//go:build minwinsvc // Copyright 2015 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( _ "github.com/gogs/minwinsvc" ) func init() { HasMinWinSvc = true }
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/log.go
internal/conf/log.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "os" "path/filepath" "strings" "github.com/pkg/errors" "gopkg.in/ini.v1" log "unknwon.dev/clog/v2" ) type loggerConf struct { ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/utils_test.go
internal/conf/utils_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "path/filepath" "testing" "github.com/stretchr/testify/assert" ) func Test_cleanUpOpenSSHVersion(t *testing.T) { tests := []struc...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/static_test.go
internal/conf/static_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "testing" "github.com/stretchr/testify/assert" ) func Test_i18n_DateLang(t *testing.T) { c := &i18nConf{ dateLangs: map[string]s...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/conf_test.go
internal/conf/conf_test.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "bytes" "path/filepath" "testing" "github.com/stretchr/testify/assert" "gopkg.in/ini.v1" "gogs.io/gogs/internal/testutil" ) fu...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/conf/computed.go
internal/conf/computed.go
// Copyright 2020 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package conf import ( "os" "os/exec" "path/filepath" "runtime" "strings" "sync" ) // ℹ️ README: This file contains configuration values that require c...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/lazyregexp/lazyre.go
internal/lazyregexp/lazyre.go
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package lazyregexp is a thin wrapper over regexp, allowing the use of global // regexp variables without forcing them to be compiled at init. package lazyreg...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/api_org.go
internal/context/api_org.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "gogs.io/gogs/internal/database" ) type APIOrganization struct { Organization *database.User Team *database.Team }
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/api.go
internal/context/api.go
// Copyright 2016 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "fmt" "net/http" "strings" "github.com/pkg/errors" "github.com/unknwon/paginater" "gopkg.in/macaron.v1" log "unknwon.dev/clo...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/notice.go
internal/context/notice.go
// Copyright 2019 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "os" "path/filepath" "github.com/unknwon/com" log "unknwon.dev/clog/v2" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/repo.go
internal/context/repo.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "bytes" "fmt" "net/url" "strings" "github.com/editorconfig/editorconfig-core-go/v2" "github.com/pkg/errors" "gopkg.in/macaro...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/store.go
internal/context/store.go
package context import ( "context" "gogs.io/gogs/internal/database" ) // Store is the data layer carrier for context middleware. This interface is // meant to abstract away and limit the exposure of the underlying data layer to // the handler through a thin-wrapper. type Store interface { // GetAccessTokenBySHA1 ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/auth.go
internal/context/auth.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "context" "net/http" "net/url" "strings" "github.com/go-macaron/csrf" "github.com/go-macaron/session" "github.com/pkg/errors...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/context.go
internal/context/context.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "fmt" "io" "net/http" "strings" "time" "github.com/go-macaron/cache" "github.com/go-macaron/csrf" "github.com/go-macaron/i1...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/user.go
internal/context/user.go
// Copyright 2018 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "gopkg.in/macaron.v1" "gogs.io/gogs/internal/database" ) // ParamsUser is the wrapper type of the target user defined by URL par...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/go_get.go
internal/context/go_get.go
package context import ( "net/http" "path" "strings" "github.com/unknwon/com" "gopkg.in/macaron.v1" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/database" "gogs.io/gogs/internal/repoutil" ) // ServeGoGet does quick responses for appropriate go-get meta with status OK // regardless of whether the user...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/context/org.go
internal/context/org.go
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package context import ( "strings" "gopkg.in/macaron.v1" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/database" ) type Organization struct { I...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false