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
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/ui/dialog/confirm_test.go
internal/ui/dialog/confirm_test.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dialog import ( "testing" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/ui" "github.com/derailed/tview" "github.com/stretchr/testify/assert" ) func TestConfirmDialog(t *testing.T) { a := tview.NewApplicati...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/ui/dialog/transfer.go
internal/ui/dialog/transfer.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dialog import ( "strconv" "strings" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/ui" "github.com/derailed/tview" ) const confirmKey = "confirm" type TransferFn func(TransferArgs) bool type TransferArgs s...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/ui/dialog/confirm.go
internal/ui/dialog/confirm.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dialog import ( "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/ui" "github.com/derailed/tview" ) const dialogKey = "dialog" type confirmFunc func() func ShowConfirmAck(app *ui.App, pages *ui.Pages, acceptStr ...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/ui/dialog/selection.go
internal/ui/dialog/selection.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dialog import ( "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/ui" "github.com/derailed/tview" ) type SelectAction func(index int) func ShowSelection(styles *config.Dialog, pages *ui.Pages, title string, optio...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
derailed/k9s
https://github.com/derailed/k9s/blob/3784c12ae74593e8aca597c3c347e8714ad3d6b7/internal/ui/dialog/prompt.go
internal/ui/dialog/prompt.go
// SPDX-License-Identifier: Apache-2.0 // Copyright Authors of K9s package dialog import ( "context" "github.com/derailed/k9s/internal/config" "github.com/derailed/k9s/internal/ui" "github.com/derailed/tview" ) type promptAction func(ctx context.Context) // ShowPrompt pops a prompt dialog. func ShowPrompt(styl...
go
Apache-2.0
3784c12ae74593e8aca597c3c347e8714ad3d6b7
2026-01-07T08:36:21.587988Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/experimental.go
experimental.go
package viper // ExperimentalBindStruct tells Viper to use the new bind struct feature. func ExperimentalBindStruct() Option { return optionFunc(func(v *Viper) { v.experimentalBindStruct = true }) }
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/flags.go
flags.go
package viper import "github.com/spf13/pflag" // FlagValueSet is an interface that users can implement // to bind a set of flags to viper. type FlagValueSet interface { VisitAll(fn func(FlagValue)) } // FlagValue is an interface that users can implement // to bind different flags to viper. type FlagValue interface ...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/finder.go
finder.go
package viper import ( "errors" "github.com/spf13/afero" ) // WithFinder sets a custom [Finder]. func WithFinder(f Finder) Option { return optionFunc(func(v *Viper) { if f == nil { return } v.finder = f }) } // Finder looks for files and directories in an [afero.Fs] filesystem. type Finder interface {...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/file.go
file.go
package viper import ( "os" "path/filepath" "github.com/sagikazarmark/locafero" "github.com/spf13/afero" ) // ExperimentalFinder tells Viper to use the new Finder interface for finding configuration files. func ExperimentalFinder() Option { return optionFunc(func(v *Viper) { v.experimentalFinder = true }) } ...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/remote.go
remote.go
package viper import ( "bytes" "fmt" "io" "reflect" "slices" ) // SupportedRemoteProviders are universally supported remote providers. var SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "firestore", "nats"} func resetRemote() { SupportedRemoteProviders = []string{"etcd", "etcd3", "consul", "fir...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/finder_test.go
finder_test.go
package viper import ( "testing" "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type finderStub struct { results []string } func (f finderStub) Find(_ afero.Fs) ([]string, error) { return f.results, nil } func TestFinders(t *testing.T) { finder := Finde...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/viper.go
viper.go
// Copyright © 2014 Steve Francia <spf@spf13.com>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. // Viper is an application configuration system. // It believes that applications can be configured a variety of ways // via flags, ENVIRONMENT variables, confi...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
true
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/viper_test.go
viper_test.go
// Copyright © 2014 Steve Francia <spf@spf13.com>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. package viper import ( "bytes" "encoding/json" "io" "os" "os/exec" "path" "path/filepath" "reflect" "runtime" "strings" "sync" "testing" "time" ...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
true
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/viper_yaml_test.go
viper_yaml_test.go
package viper var yamlExample = []byte(`Hacker: true name: steve hobbies: - skateboarding - snowboarding - go clothing: jacket: leather trousers: denim pants: size: large age: 35 eyes : brown beard: true `) var yamlWriteExpected = []byte(`age: 35 beard: true clothing: jacket: leath...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/errors.go
errors.go
package viper import ( "fmt" ) // FileLookupError is returned when Viper cannot resolve a configuration file. // // This is meant to be a common interface for all file look-up errors, occurring either because a // file does not exist or because it cannot find any file matching finder criteria. type FileLookupError i...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/util.go
util.go
// Copyright © 2014 Steve Francia <spf@spf13.com>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. // Viper is a application configuration system. // It believes that applications can be configured a variety of ways // via flags, ENVIRONMENT variables, config...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/overrides_test.go
overrides_test.go
package viper import ( "strings" "testing" "github.com/spf13/cast" "github.com/stretchr/testify/assert" ) type layer int const ( defaultLayer layer = iota + 1 overrideLayer ) func TestNestedOverrides(t *testing.T) { assert := assert.New(t) var v *Viper // Case 0: value overridden by a value overrideDefa...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/encoding_test.go
encoding_test.go
package viper import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) type codec struct{} func (codec) Encode(_ map[string]any) ([]byte, error) { return nil, nil } func (codec) Decode(_ []byte, _ map[string]any) error { return nil } func TestDefaultCodecRegistry(t *tes...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/finder_example_test.go
finder_example_test.go
package viper_test import ( "fmt" "github.com/sagikazarmark/locafero" "github.com/spf13/afero" "github.com/spf13/viper" ) func ExampleFinder() { fs := afero.NewMemMapFs() fs.Mkdir("/home/user", 0o777) f, _ := fs.Create("/home/user/myapp.yaml") f.WriteString("foo: bar") f.Close() // HCL will have a "low...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/encoding.go
encoding.go
package viper import ( "errors" "strings" "sync" "github.com/spf13/viper/internal/encoding/dotenv" "github.com/spf13/viper/internal/encoding/json" "github.com/spf13/viper/internal/encoding/toml" "github.com/spf13/viper/internal/encoding/yaml" ) // Encoder encodes Viper's internal data structures into a byte r...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/logger.go
logger.go
package viper import ( "context" "log/slog" ) // WithLogger sets a custom logger. func WithLogger(l *slog.Logger) Option { return optionFunc(func(v *Viper) { v.logger = l }) } type discardHandler struct{} func (n *discardHandler) Enabled(_ context.Context, _ slog.Level) bool { return false } func (n *discar...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/flags_test.go
flags_test.go
package viper import ( "testing" "github.com/spf13/pflag" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestBindFlagValueSet(t *testing.T) { Reset() flagSet := pflag.NewFlagSet("test", pflag.ContinueOnError) testValues := map[string]*string{ "host": nil, "port": ...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/util_test.go
util_test.go
// Copyright © 2016 Steve Francia <spf@spf13.com>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. // Viper is a application configuration system. // It believes that applications can be configured a variety of ways // via flags, ENVIRONMENT variables, config...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/remote/remote.go
remote/remote.go
// Copyright © 2015 Steve Francia <spf@spf13.com>. // // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. // Package remote integrates the remote features of Viper. package remote import ( "bytes" "io" "os" "strings" crypt "github.com/sagikazarmark/crypt/conf...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/json/codec_test.go
internal/encoding/json/codec_test.go
package json import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // encoded form of the data. const encoded = `{ "key": "value", "list": [ "item1", "item2", "item3" ], "map": { "key": "value" }, "nested_map": { "map": { "key": "valu...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/json/codec.go
internal/encoding/json/codec.go
package json import ( "encoding/json" ) // Codec implements the encoding.Encoder and encoding.Decoder interfaces for JSON encoding. type Codec struct{} // Encode encodes a map[string]any into a JSON byte slice. func (Codec) Encode(v map[string]any) ([]byte, error) { // TODO: expose prefix and indent in the Codec a...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/dotenv/map_utils.go
internal/encoding/dotenv/map_utils.go
package dotenv import ( "strings" "github.com/spf13/cast" ) // flattenAndMergeMap recursively flattens the given map into a new map // Code is based on the function with the same name in the main package. // TODO: move it to a common place. func flattenAndMergeMap(shadow, m map[string]any, prefix, delimiter string...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/dotenv/codec_test.go
internal/encoding/dotenv/codec_test.go
package dotenv import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // original form of the data. const original = `# key-value pair KEY=value ` // encoded form of the data. const encoded = `KEY=value ` // data is Viper's internal representation. var data = map[string]...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/dotenv/codec.go
internal/encoding/dotenv/codec.go
package dotenv import ( "bytes" "fmt" "sort" "strings" "github.com/subosito/gotenv" ) const keyDelimiter = "_" // Codec implements the encoding.Encoder and encoding.Decoder interfaces for encoding data containing environment variables // (commonly called as dotenv format). type Codec struct{} // Encode encode...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/toml/codec_test.go
internal/encoding/toml/codec_test.go
package toml import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // original form of the data. const original = `# key-value pair key = "value" list = ["item1", "item2", "item3"] [map] key = "value" # nested # map [nested_map] [nested_map.map] key = "value" list = [ ...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/toml/codec.go
internal/encoding/toml/codec.go
package toml import ( "github.com/pelletier/go-toml/v2" ) // Codec implements the encoding.Encoder and encoding.Decoder interfaces for TOML encoding. type Codec struct{} // Encode encodes a map[string]any into a TOML byte slice. func (Codec) Encode(v map[string]any) ([]byte, error) { return toml.Marshal(v) } // D...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/yaml/codec_test.go
internal/encoding/yaml/codec_test.go
package yaml import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // original form of the data. const original = `# key-value pair key: value list: - item1 - item2 - item3 map: key: value # nested # map nested_map: map: key: value lis...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/encoding/yaml/codec.go
internal/encoding/yaml/codec.go
package yaml import "go.yaml.in/yaml/v3" // Codec implements the encoding.Encoder and encoding.Decoder interfaces for YAML encoding. type Codec struct{} // Encode encodes a map[string]any into a YAML byte slice. func (Codec) Encode(v map[string]any) ([]byte, error) { return yaml.Marshal(v) } // Decode decodes a YA...
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/features/finder.go
internal/features/finder.go
//go:build viper_finder package features // Finder is a feature flag for enabling/disabling the config finder. const Finder = true
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/features/bind_struct.go
internal/features/bind_struct.go
//go:build viper_bind_struct package features // BindStruct is a feature flag for enabling/disabling the config binding to structs. const BindStruct = true
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/features/finder_default.go
internal/features/finder_default.go
//go:build !viper_finder package features // Finder is a feature flag for enabling/disabling the config finder. const Finder = false
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/features/bind_struct_default.go
internal/features/bind_struct_default.go
//go:build !viper_bind_struct package features // BindStruct is a feature flag for enabling/disabling the config binding to structs. const BindStruct = false
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
spf13/viper
https://github.com/spf13/viper/blob/528f7416c4b56a4948673984b190bf8713f0c3c4/internal/testutil/filepath.go
internal/testutil/filepath.go
package testutil import ( "path/filepath" "testing" ) // AbsFilePath calls filepath.Abs on path. func AbsFilePath(t *testing.T, path string) string { t.Helper() s, err := filepath.Abs(path) if err != nil { t.Fatal(err) } return s }
go
MIT
528f7416c4b56a4948673984b190bf8713f0c3c4
2026-01-07T08:36:47.476836Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/mockgen.go
mockgen.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 main //go:generate go install golang.org/x/tools/cmd/goimports@v0.17.0 //go:generate go run github.com/unknwon/go-mockgen/cmd/go-mockgen@v0.0.0-20251...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/gogs.go
gogs.go
//go:build go1.18 // 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. // Gogs is a painless self-hosted Git Service. package main import ( "os" "github.com/urfave/cli" log "unknwon.dev/clog/v2" "gogs.io...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/public/embed.go
public/embed.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 public import ( "embed" ) //go:embed assets/* css/* img/* js/* plugins/* var Files embed.FS
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/process/manager.go
internal/process/manager.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 process import ( "bytes" "errors" "fmt" "os/exec" "sync" "time" log "unknwon.dev/clog/v2" ) var ErrExecTimeout = errors.New("process executi...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/auth.go
internal/auth/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 auth import ( "fmt" "github.com/pkg/errors" "gogs.io/gogs/internal/errutil" ) type Type int // Note: New type must append to the end of list t...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/ldap/config.go
internal/auth/ldap/config.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 ldap provide functions & structure to query a LDAP ldap directory. // For now, it's mainly tested again an MS Active Directory service, see README....
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/ldap/provider.go
internal/auth/ldap/provider.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 ldap import ( "fmt" "gogs.io/gogs/internal/auth" ) // Provider contains configuration of an LDAP authentication provider. type Provider struct { ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/pam/config.go
internal/auth/pam/config.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 pam // Config contains configuration for PAM authentication. // // ⚠️ WARNING: Change to the field name must preserve the INI key name for backward c...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/pam/pam.go
internal/auth/pam/pam.go
//go:build pam // 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 pam import ( "github.com/msteinert/pam" "github.com/pkg/errors" ) func (c *Config) doAuth(login, password string) error { t, err ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/pam/pam_stub.go
internal/auth/pam/pam_stub.go
//go:build !pam // 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 pam import ( "github.com/pkg/errors" ) func (*Config) doAuth(_, _ string) error { return errors.New("PAM not supported") }
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/pam/provider.go
internal/auth/pam/provider.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 pam import ( "strings" "gogs.io/gogs/internal/auth" ) // Provider contains configuration of a PAM authentication provider. type Provider struct {...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/github/config.go
internal/auth/github/config.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 github import ( "context" "crypto/tls" "net/http" "strings" "github.com/google/go-github/github" "github.com/pkg/errors" ) // Config contains...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/github/provider.go
internal/auth/github/provider.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 github import ( "strings" "gogs.io/gogs/internal/auth" ) // Provider contains configuration of a PAM authentication provider. type Provider struc...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/smtp/config.go
internal/auth/smtp/config.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 smtp import ( "crypto/tls" "fmt" "net/smtp" "github.com/pkg/errors" ) // Config contains configuration for SMTP authentication. // // ⚠️ WARNIN...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/auth/smtp/provider.go
internal/auth/smtp/provider.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 smtp import ( "net/smtp" "net/textproto" "strings" "github.com/pkg/errors" log "unknwon.dev/clog/v2" "gogs.io/gogs/internal/auth" ) // Provi...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/hook.go
internal/cmd/hook.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 cmd import ( "bufio" "bytes" "crypto/tls" "fmt" "net/url" "os" "os/exec" "path/filepath" "strings" "github.com/unknwon/com" "github.com/u...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/admin.go
internal/cmd/admin.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 cmd import ( "context" "fmt" "reflect" "runtime" "github.com/pkg/errors" "github.com/urfave/cli" "gogs.io/gogs/internal/conf" "gogs.io/gogs...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/restore.go
internal/cmd/restore.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 cmd import ( "context" "os" "path" "path/filepath" "github.com/pkg/errors" "github.com/unknwon/cae/zip" "github.com/urfave/cli" "gopkg.in/in...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/cmd.go
internal/cmd/cmd.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 cmd import ( "time" "github.com/urfave/cli" ) func stringFlag(name, value, usage string) cli.StringFlag { return cli.StringFlag{ Name: name, ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/web.go
internal/cmd/web.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 cmd import ( "crypto/tls" "fmt" "io" "net" "net/http" "net/http/fcgi" "os" "path/filepath" "strings" "github.com/go-macaron/binding" "git...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/backup.go
internal/cmd/backup.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 cmd import ( "context" "fmt" "os" "path" "path/filepath" "strconv" "time" "github.com/pkg/errors" "github.com/unknwon/cae/zip" "github.com...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/serv.go
internal/cmd/serv.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 cmd import ( "context" "fmt" "os" "os/exec" "path/filepath" "strings" "time" "github.com/unknwon/com" "github.com/urfave/cli" log "unknwon...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/cert.go
internal/cmd/cert.go
// Copyright 2009 The Go 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 cmd import ( "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "crypto/rsa" "crypto/x509" "...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cmd/import.go
internal/cmd/import.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 cmd import ( "bufio" "bytes" "fmt" "os" "path/filepath" "time" "github.com/pkg/errors" "github.com/unknwon/com" "github.com/urfave/cli" "...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/mocks/locale.go
internal/mocks/locale.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 mocks import ( "gopkg.in/macaron.v1" ) var _ macaron.Locale = (*Locale)(nil) type Locale struct { MockLang string MockTr func(string, ...any) ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/app/metrics.go
internal/app/metrics.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 app import ( "net/http" "gopkg.in/macaron.v1" "gogs.io/gogs/internal/authutil" "gogs.io/gogs/internal/conf" ) func MetricsFilter() macaron.Han...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/app/api.go
internal/app/api.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 app import ( "net/http" "github.com/microcosm-cc/bluemonday" "gopkg.in/macaron.v1" ) func ipynbSanitizer() *bluemonday.Policy { p := bluemonday...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/app/api_test.go
internal/app/api_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 app import ( "testing" "github.com/stretchr/testify/assert" ) func Test_ipynbSanitizer(t *testing.T) { p := ipynbSanitizer() tests := []struct...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/avatar/avatar_test.go
internal/avatar/avatar_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 avatar import ( "testing" "github.com/stretchr/testify/assert" ) func Test_RandomImage(t *testing.T) { _, err := RandomImage([]byte("gogs@local"...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/avatar/avatar.go
internal/avatar/avatar.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 avatar import ( "fmt" "image" "image/color/palette" "math/rand" "time" "github.com/issue9/identicon" ) const DefaultSize = 290 // RandomImag...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/osutil/osutil.go
internal/osutil/osutil.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 osutil import ( "os" "os/user" ) // IsFile returns true if given path exists as a file (i.e. not a directory). func IsFile(path string) bool { f,...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/osutil/error.go
internal/osutil/error.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 osutil import ( "os" "gogs.io/gogs/internal/errutil" ) var _ errutil.NotFound = (*Error)(nil) // Error is a wrapper of an OS error, which handle...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/osutil/error_test.go
internal/osutil/error_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 osutil import ( "os" "testing" "github.com/stretchr/testify/assert" "gogs.io/gogs/internal/errutil" ) func TestError_NotFound(t *testing.T) { ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/osutil/osutil_test.go
internal/osutil/osutil_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 osutil import ( "os" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestIsFile(t *testing.T) { te...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/authutil/basic.go
internal/authutil/basic.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 authutil import ( "encoding/base64" "net/http" "strings" ) // DecodeBasic extracts username and password from given header using HTTP Basic Auth....
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/authutil/basic_test.go
internal/authutil/basic_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 authutil import ( "net/http" "testing" "github.com/stretchr/testify/assert" ) func TestDecodeBasic(t *testing.T) { tests := []struct { name ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/errutil/errutil_test.go
internal/errutil/errutil_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 errutil import ( "errors" "testing" "github.com/stretchr/testify/assert" ) type notFoundError struct { val bool } func (notFoundError) Error()...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/errutil/errutil.go
internal/errutil/errutil.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 errutil // NotFound represents a not found error. type NotFound interface { NotFound() bool } // IsNotFound returns true if the error is a not foun...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/userutil/userutil_test.go
internal/userutil/userutil_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 userutil import ( "os" "runtime" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gogs.io/gogs/internal/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/userutil/userutil.go
internal/userutil/userutil.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 userutil import ( "bytes" "crypto/sha256" "crypto/subtle" "encoding/hex" "fmt" "image" "image/png" "os" "path/filepath" "strconv" "strings...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/cron/cron.go
internal/cron/cron.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 cron import ( "time" log "unknwon.dev/clog/v2" "github.com/gogs/cron" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/database" ) var c ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/ssh/ssh.go
internal/ssh/ssh.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 ssh import ( "context" "io" "net" "os" "os/exec" "path/filepath" "strings" "syscall" "github.com/pkg/errors" "github.com/sourcegraph/run" ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/semverutil/semverutil_test.go
internal/semverutil/semverutil_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 semverutil import ( "testing" "github.com/stretchr/testify/assert" ) func TestCheck(t *testing.T) { tests := []struct { version1 string co...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/semverutil/semverutil.go
internal/semverutil/semverutil.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 semverutil import ( "strings" "github.com/Masterminds/semver/v3" ) // Compare returns true if the comparison is true for given versions. It retur...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/dbtest/dbtest.go
internal/dbtest/dbtest.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 dbtest import ( "database/sql" "fmt" "os" "path/filepath" "testing" "time" "github.com/stretchr/testify/require" "gorm.io/gorm" "gorm.io/go...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/repoutil/repoutil_test.go
internal/repoutil/repoutil_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 repoutil import ( "runtime" "testing" "github.com/stretchr/testify/assert" "gogs.io/gogs/internal/conf" ) func TestNewCloneLink(t *testing.T) ...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/repoutil/repoutil.go
internal/repoutil/repoutil.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 repoutil import ( "fmt" "path/filepath" "strconv" "strings" "gogs.io/gogs/internal/conf" ) // CloneLink represents different types of clone UR...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/email/email.go
internal/email/email.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 email import ( "fmt" "html/template" "path/filepath" "sync" "time" "gopkg.in/gomail.v2" "gopkg.in/macaron.v1" log "unknwon.dev/clog/v2" "g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/email/message.go
internal/email/message.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 email import ( "crypto/tls" "fmt" "io" "net" "net/smtp" "os" "strings" "time" "github.com/jaytaylor/html2text" "gopkg.in/gomail.v2" log "...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/install.go
internal/route/install.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 route import ( "net/mail" "os" "os/exec" "path/filepath" "strings" "github.com/gogs/git-module" "github.com/pkg/errors" "github.com/unknwon/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/home.go
internal/route/home.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 route import ( gocontext "context" "fmt" "net/http" "github.com/go-macaron/i18n" "github.com/unknwon/paginater" "gopkg.in/macaron.v1" "gogs....
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/dev/template.go
internal/route/dev/template.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 dev import ( "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/context" "gogs.io/gogs/internal/database" ) func TemplatePreview(c *context.Cont...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/user/profile.go
internal/route/user/profile.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 user import ( "strings" "github.com/unknwon/paginater" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/context" "gogs.io/gogs/internal/dat...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/user/home.go
internal/route/user/home.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 user import ( "bytes" "fmt" "net/http" "github.com/unknwon/com" "github.com/unknwon/paginater" "gogs.io/gogs/internal/conf" "gogs.io/gogs/in...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/user/setting.go
internal/route/user/setting.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 user import ( "bytes" gocontext "context" "encoding/base64" "fmt" "html/template" "image/png" "io" "github.com/pkg/errors" "github.com/pque...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/user/auth.go
internal/route/user/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 user import ( gocontext "context" "encoding/hex" "fmt" "net/http" "net/url" "github.com/go-macaron/captcha" "github.com/unknwon/com" log "un...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/admin/admin.go
internal/route/admin/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 admin import ( "fmt" "runtime" "strings" "time" jsoniter "github.com/json-iterator/go" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/c...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/admin/orgs.go
internal/route/admin/orgs.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 admin import ( gocontext "context" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/context" "gogs.io/gogs/internal/database" "gogs.io/gogs/...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/admin/auths.go
internal/route/admin/auths.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 admin import ( "fmt" "net/http" "strings" "github.com/unknwon/com" log "unknwon.dev/clog/v2" "gogs.io/gogs/internal/auth" "gogs.io/gogs/inte...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/admin/notice.go
internal/route/admin/notice.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 admin import ( "net/http" "github.com/unknwon/com" "github.com/unknwon/paginater" log "unknwon.dev/clog/v2" "gogs.io/gogs/internal/conf" "gog...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/admin/repos.go
internal/route/admin/repos.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 admin import ( "github.com/unknwon/paginater" log "unknwon.dev/clog/v2" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/context" "gogs.io/g...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false
gogs/gogs
https://github.com/gogs/gogs/blob/e68949dd1307d1b72a2fe885976ea0be72ee31d5/internal/route/admin/users.go
internal/route/admin/users.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 admin import ( "strconv" "strings" log "unknwon.dev/clog/v2" "gogs.io/gogs/internal/conf" "gogs.io/gogs/internal/context" "gogs.io/gogs/inter...
go
MIT
e68949dd1307d1b72a2fe885976ea0be72ee31d5
2026-01-07T08:35:43.578986Z
false