MCPcopy Create free account
hub / github.com/rilldata/rill / getProject

Function getProject

cli/cmd/project/deploy.go:640–656  ·  view source on GitHub ↗
(ctx context.Context, ch *cmdutil.Helper, org, project string)

Source from the content-addressed store, hash-verified

638}
639
640func getProject(ctx context.Context, ch *cmdutil.Helper, org, project string) (*adminv1.Project, bool, error) {
641 c, err := ch.Client()
642 if err != nil {
643 return nil, false, err
644 }
645
646 p, err := c.GetProject(ctx, &adminv1.GetProjectRequest{Org: org, Project: project})
647 if err != nil {
648 if st, ok := status.FromError(err); ok {
649 if st.Code() == codes.NotFound {
650 return nil, false, nil
651 }
652 }
653 return nil, false, err
654 }
655 return p.Project, true, nil
656}
657
658func errMsgContains(err error, msg string) bool {
659 if st, ok := status.FromError(err); ok && st != nil {

Callers 2

projectNamePromptFunction · 0.70

Calls 2

GetProjectMethod · 0.65
ClientMethod · 0.45

Tested by

no test coverage detected