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 |
|---|---|---|---|---|---|---|---|---|
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/form_mapping_benchmark_test.go | binding/form_mapping_benchmark_test.go | // Copyright 2019 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
var form = map[string][]string{
"name": {"mike"},
"friends": {"an... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/uri.go | binding/uri.go | // Copyright 2018 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
type uriBinding struct{}
func (uriBinding) Name() string {
return "uri"
}
func (uriBinding) BindUri(m map[string][]string, obj any) error {
... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/binding_test.go | binding/binding_test.go | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"bytes"
"encoding/json"
"errors"
"io"
"mime/multipart"
"net/http"
"os"
"reflect"
"strconv"
"strings"
"testing"
"tim... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | true |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/binding.go | binding/binding.go | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
//go:build !nomsgpack
package binding
import "net/http"
// Content-Type MIME of the most common data formats.
const (
MIMEJSON = "applic... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/msgpack.go | binding/msgpack.go | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
//go:build !nomsgpack
package binding
import (
"bytes"
"io"
"net/http"
"github.com/ugorji/go/codec"
)
type msgpackBinding struct{}
func (msgpack... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/json_test.go | binding/json_test.go | // Copyright 2019 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"io"
"net/http/httptest"
"testing"
"time"
"unsafe"
"github.com/gin-gonic/gin/codec/json"
"github.com/gin-gonic/gin/render"
jso... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/toml_test.go | binding/toml_test.go | // Copyright 2022 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestTOMLBindingBindBody(t *testing.T) ... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/plain.go | binding/plain.go | package binding
import (
"fmt"
"io"
"net/http"
"reflect"
"github.com/gin-gonic/gin/internal/bytesconv"
)
type plainBinding struct{}
func (plainBinding) Name() string {
return "plain"
}
func (plainBinding) Bind(req *http.Request, obj any) error {
all, err := io.ReadAll(req.Body)
if err != nil {
return err... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/yaml_test.go | binding/yaml_test.go | // Copyright 2019 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestYAMLBindingBindBody(t *testing.T) ... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/yaml.go | binding/yaml.go | // Copyright 2018 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"bytes"
"io"
"net/http"
"github.com/goccy/go-yaml"
)
type yamlBinding struct{}
func (yamlBinding) Name() string {
return "yaml"... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/default_validator.go | binding/default_validator.go | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"reflect"
"strconv"
"strings"
"sync"
"github.com/go-playground/validator/v10"
)
type defaultValidator struct {
once ... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/binding_msgpack_test.go | binding/binding_msgpack_test.go | // Copyright 2020 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
//go:build !nomsgpack
package binding
import (
"bytes"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/protobuf.go | binding/protobuf.go | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"errors"
"io"
"net/http"
"google.golang.org/protobuf/proto"
)
type protobufBinding struct{}
func (protobufBinding) Name(... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/header.go | binding/header.go | // Copyright 2022 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"net/http"
"net/textproto"
"reflect"
)
type headerBinding struct{}
func (headerBinding) Name() string {
return "header"
}
func (... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/form_mapping_test.go | binding/form_mapping_test.go | // Copyright 2019 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"encoding/hex"
"errors"
"mime/multipart"
"reflect"
"strconv"
"strings"
"testing"
"time"
"github.com/stretchr/testify/assert"
... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/binding_nomsgpack.go | binding/binding_nomsgpack.go | // Copyright 2020 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
//go:build nomsgpack
package binding
import "net/http"
// Content-Type MIME of the most common data formats.
const (
MIMEJSON = "application/jso... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/multipart_form_mapping.go | binding/multipart_form_mapping.go | // Copyright 2019 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"errors"
"mime/multipart"
"net/http"
"reflect"
)
type multipartRequest http.Request
var _ setter = (*multipartRequest)(nil)
var ... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/multipart_form_mapping_test.go | binding/multipart_form_mapping_test.go | // Copyright 2019 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"bytes"
"io"
"mime/multipart"
"net/http"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/query.go | binding/query.go | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import "net/http"
type queryBinding struct{}
func (queryBinding) Name() string {
return "query"
}
func (queryBinding) Bind(req *http... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/toml.go | binding/toml.go | // Copyright 2022 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"bytes"
"io"
"net/http"
"github.com/pelletier/go-toml/v2"
)
type tomlBinding struct{}
func (tomlBinding) Name() string {
return... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/form_mapping.go | binding/form_mapping.go | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"errors"
"fmt"
"maps"
"mime/multipart"
"reflect"
"strconv"
"strings"
"time"
"github.com/gin-gonic/gin/codec/json"
"g... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/default_validator_benchmark_test.go | binding/default_validator_benchmark_test.go | // Copyright 2022 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"errors"
"strconv"
"testing"
)
func BenchmarkSliceValidationError(b *testing.B) {
const size int = 100
e := make(SliceValidationE... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/default_validator_test.go | binding/default_validator_test.go | // Copyright 2020 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"errors"
"testing"
)
func TestSliceValidationError(t *testing.T) {
tests := []struct {
name string
err SliceValidationError
... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/msgpack_test.go | binding/msgpack_test.go | // Copyright 2019 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
//go:build !nomsgpack
package binding
import (
"bytes"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/u... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
gin-gonic/gin | https://github.com/gin-gonic/gin/blob/9914178584e42458ff7d23891463a880f58c9d86/binding/validate_test.go | binding/validate_test.go | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package binding
import (
"bytes"
"testing"
"time"
"github.com/go-playground/validator/v10"
"github.com/stretchr/testify/assert"
"github.com/stret... | go | MIT | 9914178584e42458ff7d23891463a880f58c9d86 | 2026-01-07T08:35:43.439653Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules.go | modules.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/service_windows.go | service_windows.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/storage.go | storage.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/listen_unix_setopt.go | listen_unix_setopt.go | //go:build unix && !freebsd && !solaris
package caddy
import "golang.org/x/sys/unix"
const unixSOREUSEPORT = unix.SO_REUSEPORT
| go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/admin.go | admin.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | true |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/logging.go | logging.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/listeners.go | listeners.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/listeners_test.go | listeners_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/metrics.go | metrics.go | package caddy
import (
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/caddyserver/caddy/v2/internal/metrics"
)
// define and register the metrics used in this package.
func init() {
const ns, sub = "caddy", "admin"
adminMetrics.requestCount = prometheus.NewCounterVec(prometheus.Counter... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/replacer.go | replacer.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddy_test.go | caddy_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/listen_unix.go | listen_unix.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/filepath.go | filepath.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/context_test.go | context_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/sigtrap.go | sigtrap.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/filesystem.go | filesystem.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/replacer_fuzz.go | replacer_fuzz.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/modules_test.go | modules_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/duration_fuzz.go | duration_fuzz.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/listen.go | listen.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddy.go | caddy.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | true |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/usagepool.go | usagepool.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/sigtrap_nonposix.go | sigtrap_nonposix.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/listeners_fuzz.go | listeners_fuzz.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/context.go | context.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/admin_test.go | admin_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/replacer_test.go | replacer_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/filepath_windows.go | filepath_windows.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/sigtrap_posix.go | sigtrap_posix.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/logging_test.go | logging_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/listen_unix_setopt_freebsd.go | listen_unix_setopt_freebsd.go | //go:build freebsd
package caddy
import "golang.org/x/sys/unix"
const unixSOREUSEPORT = unix.SO_REUSEPORT_LB
| go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/removebinary.go | cmd/removebinary.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/commands.go | cmd/commands.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/x509rootsfallback.go | cmd/x509rootsfallback.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/cobra.go | cmd/cobra.go | package caddycmd
import (
"fmt"
"github.com/spf13/cobra"
"github.com/caddyserver/caddy/v2"
)
var defaultFactory = newRootCommandFactory(func() *cobra.Command {
return &cobra.Command{
Use: "caddy",
Long: `Caddy is an extensible server platform written in Go.
At its core, Caddy merely manages configuration. ... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/main_test.go | cmd/main_test.go | package caddycmd
import (
"reflect"
"strings"
"testing"
)
func TestParseEnvFile(t *testing.T) {
for i, tc := range []struct {
input string
expect map[string]string
shouldErr bool
}{
{
input: `KEY=value`,
expect: map[string]string{
"KEY": "value",
},
},
{
input: `
KEY=value
... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/commands_test.go | cmd/commands_test.go | package caddycmd
import (
"maps"
"reflect"
"slices"
"testing"
)
func TestCommandsAreAvailable(t *testing.T) {
// trigger init, and build the default factory, so that
// all commands from this package are available
cmd := defaultFactory.Build()
if cmd == nil {
t.Fatal("default factory failed to build")
}
... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/storagefuncs.go | cmd/storagefuncs.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/packagesfuncs.go | cmd/packagesfuncs.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/removebinary_windows.go | cmd/removebinary_windows.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/commandfactory.go | cmd/commandfactory.go | package caddycmd
import (
"github.com/spf13/cobra"
)
type rootCommandFactory struct {
constructor func() *cobra.Command
options []func(*cobra.Command)
}
func newRootCommandFactory(fn func() *cobra.Command) *rootCommandFactory {
return &rootCommandFactory{
constructor: fn,
}
}
func (f *rootCommandFactory)... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/main.go | cmd/main.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/commandfuncs.go | cmd/commandfuncs.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/cmd/caddy/main.go | cmd/caddy/main.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httploader.go | caddyconfig/httploader.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/configadapters.go | caddyconfig/configadapters.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/load.go | caddyconfig/load.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/addresses.go | caddyconfig/httpcaddyfile/addresses.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/addresses_fuzz.go | caddyconfig/httpcaddyfile/addresses_fuzz.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/tlsapp.go | caddyconfig/httpcaddyfile/tlsapp.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | true |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/serveroptions.go | caddyconfig/httpcaddyfile/serveroptions.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/builtins_test.go | caddyconfig/httpcaddyfile/builtins_test.go | package httpcaddyfile
import (
"strings"
"testing"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
_ "github.com/caddyserver/caddy/v2/modules/logging"
)
func TestLogDirectiveSyntax(t *testing.T) {
for i, tc := range []struct {
input string
output string
expectError bool
}{
{
input... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/httptype_test.go | caddyconfig/httpcaddyfile/httptype_test.go | package httpcaddyfile
import (
"testing"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
)
func TestMatcherSyntax(t *testing.T) {
for i, tc := range []struct {
input string
expectError bool
}{
{
input: `http://localhost
@debug {
query showdebug=1
}
`,
expectError: false,
... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/builtins.go | caddyconfig/httpcaddyfile/builtins.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | true |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/addresses_test.go | caddyconfig/httpcaddyfile/addresses_test.go | package httpcaddyfile
import (
"testing"
)
func TestParseAddress(t *testing.T) {
for i, test := range []struct {
input string
scheme, host, port, path string
shouldErr bool
}{
{``, "", "", "", "", false},
{`localhost`, "", "localhost", "", "", false},
{`localhost:1234`... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/pkiapp.go | caddyconfig/httpcaddyfile/pkiapp.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/tlsapp_test.go | caddyconfig/httpcaddyfile/tlsapp_test.go | package httpcaddyfile
import (
"testing"
"github.com/caddyserver/caddy/v2/modules/caddytls"
)
func TestAutomationPolicyIsSubset(t *testing.T) {
for i, test := range []struct {
a, b []string
expect bool
}{
{
a: []string{"example.com"},
b: []string{},
expect: true,
},
{
a: []... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/directives.go | caddyconfig/httpcaddyfile/directives.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/options_test.go | caddyconfig/httpcaddyfile/options_test.go | package httpcaddyfile
import (
"testing"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
_ "github.com/caddyserver/caddy/v2/modules/logging"
)
func TestGlobalLogOptionSyntax(t *testing.T) {
for i, tc := range []struct {
input string
output string
expectError bool
}{
// NOTE: Additiona... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/options.go | caddyconfig/httpcaddyfile/options.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/shorthands.go | caddyconfig/httpcaddyfile/shorthands.go | package httpcaddyfile
import (
"regexp"
"strings"
"github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
)
type ComplexShorthandReplacer struct {
search *regexp.Regexp
replace string
}
type ShorthandReplacer struct {
complex []ComplexShorthandReplacer
simple *strings.Replacer
}
func NewShorthandReplacer(... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/directives_test.go | caddyconfig/httpcaddyfile/directives_test.go | package httpcaddyfile
import (
"reflect"
"sort"
"testing"
)
func TestHostsFromKeys(t *testing.T) {
for i, tc := range []struct {
keys []Address
expectNormalMode []string
expectLoggerMode []string
}{
{
[]Address{
{Original: "foo", Host: "foo"},
},
[]string{"foo"},
[]string{"foo... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/httpcaddyfile/httptype.go | caddyconfig/httpcaddyfile/httptype.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | true |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/dispenser_test.go | caddyconfig/caddyfile/dispenser_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/importgraph.go | caddyconfig/caddyfile/importgraph.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/formatter_test.go | caddyconfig/caddyfile/formatter_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/lexer.go | caddyconfig/caddyfile/lexer.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/formatter_fuzz.go | caddyconfig/caddyfile/formatter_fuzz.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/formatter.go | caddyconfig/caddyfile/formatter.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/lexer_test.go | caddyconfig/caddyfile/lexer_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/parse_test.go | caddyconfig/caddyfile/parse_test.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/lexer_fuzz.go | caddyconfig/caddyfile/lexer_fuzz.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/dispenser.go | caddyconfig/caddyfile/dispenser.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/adapter.go | caddyconfig/caddyfile/adapter.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
caddyserver/caddy | https://github.com/caddyserver/caddy/blob/28103aafba3490eedb626823f9641b766c7c99fd/caddyconfig/caddyfile/parse.go | caddyconfig/caddyfile/parse.go | // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | 28103aafba3490eedb626823f9641b766c7c99fd | 2026-01-07T08:35:43.461103Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.