MCPcopy
hub / github.com/rclone/rclone / AddConfig

Function AddConfig

fs/config.go:824–830  ·  view source on GitHub ↗

AddConfig returns a mutable config structure based on a shallow copy of that found in ctx and returns a new context with that added to it.

(ctx context.Context)

Source from the content-addressed store, hash-verified

822// copy of that found in ctx and returns a new context with that added
823// to it.
824func AddConfig(ctx context.Context) (context.Context, *ConfigInfo) {
825 c := GetConfig(ctx)
826 cCopy := new(ConfigInfo)
827 *cCopy = *c
828 newCtx := context.WithValue(ctx, configContextKey, cCopy)
829 return newCtx, cCopy
830}
831
832// ConfigToEnv converts a config section and name, e.g. ("my-remote",
833// "ignore-size") into an environment name

Callers 15

NewFsFunction · 0.92
NewFsFunction · 0.92
InternalTestVersionsMethod · 0.92
NewFsFunction · 0.92
NewFunction · 0.92
TestWritePermissionsMethod · 0.92
TestReadPermissionsMethod · 0.92
TestReadMetadataMethod · 0.92
TestDirectoryMetadataMethod · 0.92

Calls 1

GetConfigFunction · 0.70

Tested by 15

InternalTestVersionsMethod · 0.74
TestWritePermissionsMethod · 0.74
TestReadPermissionsMethod · 0.74
TestReadMetadataMethod · 0.74
TestDirectoryMetadataMethod · 0.74
TestMetadataMapperMethod · 0.74
testMetadataPathsMethod · 0.74
TestBisyncRemoteLocalFunction · 0.74
TestBisyncLocalRemoteFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…