mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-09 21:07:30 -06:00
[chore] update dependencies (#4188)
Update dependencies:
- github.com/gin-gonic/gin v1.10.0 -> v1.10.1
- github.com/gin-contrib/sessions v1.10.3 -> v1.10.4
- github.com/jackc/pgx/v5 v5.7.4 -> v5.7.5
- github.com/minio/minio-go/v7 v7.0.91 -> v7.0.92
- github.com/pquerna/otp v1.4.0 -> v1.5.0
- github.com/tdewolff/minify/v2 v2.23.5 -> v2.23.8
- github.com/yuin/goldmark v1.7.11 -> v1.7.12
- go.opentelemetry.io/otel{,/*} v1.35.0 -> v1.36.0
- modernc.org/sqlite v1.37.0 -> v1.37.1
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4188
Reviewed-by: Daenney <daenney@noreply.codeberg.org>
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
20aad9be0f
commit
b6ff55662e
214 changed files with 44839 additions and 32023 deletions
30
vendor/go.opentelemetry.io/otel/propagation/propagation.go
generated
vendored
30
vendor/go.opentelemetry.io/otel/propagation/propagation.go
generated
vendored
|
|
@ -9,6 +9,7 @@ import (
|
|||
)
|
||||
|
||||
// TextMapCarrier is the storage medium used by a TextMapPropagator.
|
||||
// See ValuesGetter for how a TextMapCarrier can get multiple values for a key.
|
||||
type TextMapCarrier interface {
|
||||
// DO NOT CHANGE: any modification will not be backwards compatible and
|
||||
// must never be done outside of a new major release.
|
||||
|
|
@ -29,6 +30,18 @@ type TextMapCarrier interface {
|
|||
// must never be done outside of a new major release.
|
||||
}
|
||||
|
||||
// ValuesGetter can return multiple values for a single key,
|
||||
// with contrast to TextMapCarrier.Get which returns a single value.
|
||||
type ValuesGetter interface {
|
||||
// DO NOT CHANGE: any modification will not be backwards compatible and
|
||||
// must never be done outside of a new major release.
|
||||
|
||||
// Values returns all values associated with the passed key.
|
||||
Values(key string) []string
|
||||
// DO NOT CHANGE: any modification will not be backwards compatible and
|
||||
// must never be done outside of a new major release.
|
||||
}
|
||||
|
||||
// MapCarrier is a TextMapCarrier that uses a map held in memory as a storage
|
||||
// medium for propagated key-value pairs.
|
||||
type MapCarrier map[string]string
|
||||
|
|
@ -55,14 +68,25 @@ func (c MapCarrier) Keys() []string {
|
|||
return keys
|
||||
}
|
||||
|
||||
// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier interface.
|
||||
// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier and ValuesGetter interfaces.
|
||||
type HeaderCarrier http.Header
|
||||
|
||||
// Get returns the value associated with the passed key.
|
||||
// Compile time check that HeaderCarrier implements ValuesGetter.
|
||||
var _ TextMapCarrier = HeaderCarrier{}
|
||||
|
||||
// Compile time check that HeaderCarrier implements TextMapCarrier.
|
||||
var _ ValuesGetter = HeaderCarrier{}
|
||||
|
||||
// Get returns the first value associated with the passed key.
|
||||
func (hc HeaderCarrier) Get(key string) string {
|
||||
return http.Header(hc).Get(key)
|
||||
}
|
||||
|
||||
// Values returns all values associated with the passed key.
|
||||
func (hc HeaderCarrier) Values(key string) []string {
|
||||
return http.Header(hc).Values(key)
|
||||
}
|
||||
|
||||
// Set stores the key-value pair.
|
||||
func (hc HeaderCarrier) Set(key string, value string) {
|
||||
http.Header(hc).Set(key, value)
|
||||
|
|
@ -89,6 +113,8 @@ type TextMapPropagator interface {
|
|||
// must never be done outside of a new major release.
|
||||
|
||||
// Extract reads cross-cutting concerns from the carrier into a Context.
|
||||
// Implementations may check if the carrier implements ValuesGetter,
|
||||
// to support extraction of multiple values per key.
|
||||
Extract(ctx context.Context, carrier TextMapCarrier) context.Context
|
||||
// DO NOT CHANGE: any modification will not be backwards compatible and
|
||||
// must never be done outside of a new major release.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue