MCPcopy Create free account
hub / github.com/devld/go-drive / Get

Method Get

drive/script/index.go:113–124  ·  view source on GitHub ↗
(ctx context.Context, path string)

Source from the content-addressed store, hash-verified

111}
112
113func (sd *ScriptDrive) Get(ctx context.Context, path string) (types.IEntry, error) {
114 vm, e := sd.pool.Get(ctx)
115 if e != nil {
116 return nil, e
117 }
118 defer func() { _ = sd.pool.Return(context.Background(), vm) }()
119 v, e := sd.call(ctx, vm, "get", s.NewContext(vm, ctx), path)
120 if e != nil {
121 return nil, e
122 }
123 return sd.valueToEntry(v), nil
124}
125
126func (sd *ScriptDrive) Save(ctx types.TaskCtx, path string, size int64, override bool, reader io.Reader) (types.IEntry, error) {
127 vm, e := sd.pool.Get(ctx)

Callers

nothing calls this directly

Calls 4

callMethod · 0.95
valueToEntryMethod · 0.95
ReturnMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected