MCPcopy Create free account
hub / github.com/docker/go-plugins-helpers / writeSpecFile

Function writeSpecFile

sdk/spec_file_generator.go:48–57  ·  view source on GitHub ↗
(name, address, pluginSpecDir string, proto protocol)

Source from the content-addressed store, hash-verified

46}
47
48func writeSpecFile(name, address, pluginSpecDir string, proto protocol) (string, error) {
49 specFileDir := filepath.Join(pluginSpecDir, name+".spec")
50
51 url := string(proto) + "://" + address
52 if err := os.WriteFile(specFileDir, []byte(url), 0644); err != nil {
53 return "", err
54 }
55
56 return specFileDir, nil
57}

Callers 2

newWindowsListenerFunction · 0.85
newTCPListenerFunction · 0.85

Calls 1

JoinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…