()
| 628 | } |
| 629 | |
| 630 | func (b *Builder) getTemplate() (*database.Template, error) { |
| 631 | if b.template != nil { |
| 632 | return b.template, nil |
| 633 | } |
| 634 | t, err := b.store.GetTemplateByID(b.ctx, b.workspace.TemplateID) |
| 635 | if err != nil { |
| 636 | return nil, xerrors.Errorf("get template %s: %w", b.workspace.TemplateID, err) |
| 637 | } |
| 638 | b.template = &t |
| 639 | return b.template, nil |
| 640 | } |
| 641 | |
| 642 | func (b *Builder) getTemplateVersionJob() (*database.ProvisionerJob, error) { |
| 643 | if b.templateVersionJob != nil { |
no outgoing calls
no test coverage detected