MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Get

Method Get

internal/instructions/store.go:162–172  ·  view source on GitHub ↗

Get returns one instruction (with installs) by id.

(ctx context.Context, id int64)

Source from the content-addressed store, hash-verified

160
161// Get returns one instruction (with installs) by id.
162func (s *Store) Get(ctx context.Context, id int64) (Instruction, error) {
163 if err := s.Init(ctx); err != nil {
164 return Instruction{}, err
165 }
166 db, err := s.open()
167 if err != nil {
168 return Instruction{}, err
169 }
170 defer db.Close()
171 return getTx(ctx, db, id)
172}
173
174func getTx(ctx context.Context, q queryer, id int64) (Instruction, error) {
175 var in Instruction

Callers 5

CreateMethod · 0.95
UpdateMethod · 0.95
InstallMethod · 0.95
TestCRUDRoundTripFunction · 0.45
TestGetNotFoundFunction · 0.45

Calls 3

InitMethod · 0.95
openMethod · 0.95
getTxFunction · 0.85

Tested by 2

TestCRUDRoundTripFunction · 0.36
TestGetNotFoundFunction · 0.36