MCPcopy Create free account
hub / github.com/coder/coder / DevcontainersFromProto

Function DevcontainersFromProto

codersdk/agentsdk/convert.go:419–429  ·  view source on GitHub ↗
(pdcs []*proto.WorkspaceAgentDevcontainer)

Source from the content-addressed store, hash-verified

417}
418
419func DevcontainersFromProto(pdcs []*proto.WorkspaceAgentDevcontainer) ([]codersdk.WorkspaceAgentDevcontainer, error) {
420 ret := make([]codersdk.WorkspaceAgentDevcontainer, len(pdcs))
421 for i, pdc := range pdcs {
422 dc, err := DevcontainerFromProto(pdc)
423 if err != nil {
424 return nil, xerrors.Errorf("parse devcontainer %v: %w", i, err)
425 }
426 ret[i] = dc
427 }
428 return ret, nil
429}
430
431func DevcontainerFromProto(pdc *proto.WorkspaceAgentDevcontainer) (codersdk.WorkspaceAgentDevcontainer, error) {
432 id, err := uuid.FromBytes(pdc.Id)

Callers 1

ManifestFromProtoFunction · 0.85

Calls 2

DevcontainerFromProtoFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected