plan is heavy (89 bytes); consider passing it by pointer
36
37func NewSetPipelineStep(
38 planID atc.PlanID,
39 plan atc.SetPipelinePlan, 40 metadata StepMetadata,
41 delegateFactory SetPipelineStepDelegateFactory,
42 teamFactory db.TeamFactory,
metadata is heavy (136 bytes); consider passing it by pointer
37func NewSetPipelineStep(
38 planID atc.PlanID,
39 plan atc.SetPipelinePlan,
40 metadata StepMetadata, 41 delegateFactory SetPipelineStepDelegateFactory,
42 teamFactory db.TeamFactory,
43 buildFactory db.BuildFactory,
plan is heavy (208 bytes); consider passing it by pointer
1063 return build, nil
1064}
1065
1066func (p *pipeline) CreateStartedBuild(plan atc.Plan) (Build, error) {1067 tx, err := p.conn.Begin()
1068 if err != nil {
1069 return nil, err
result1 is heavy (152 bytes); consider passing it by pointer
954 fake.ConfigStub = stub
955}
956
957func (fake *FakePipeline) ConfigReturns(result1 atc.Config, result2 error) { 958 fake.configMutex.Lock()
959 defer fake.configMutex.Unlock()
960 fake.ConfigStub = nil
result1 is heavy (152 bytes); consider passing it by pointer
964 }{result1, result2}
965}
966
967func (fake *FakePipeline) ConfigReturnsOnCall(i int, result1 atc.Config, result2 error) { 968 fake.configMutex.Lock()
969 defer fake.configMutex.Unlock()
970 fake.ConfigStub = nil
arg1 is heavy (208 bytes); consider passing it by pointer
1089 }{result1, result2}
1090}
1091
1092func (fake *FakePipeline) CreateStartedBuild(arg1 atc.Plan) (db.Build, error) {1093 fake.createStartedBuildMutex.Lock()
1094 ret, specificReturn := fake.createStartedBuildReturnsOnCall[len(fake.createStartedBuildArgsForCall)]
1095 fake.createStartedBuildArgsForCall = append(fake.createStartedBuildArgsForCall, struct {
arg1 is heavy (208 bytes); consider passing it by pointer
4206 }{result1}
4207}
4208
4209func (fake *FakeBuild) Start(arg1 atc.Plan) (bool, error) {4210 fake.startMutex.Lock()
4211 ret, specificReturn := fake.startReturnsOnCall[len(fake.startArgsForCall)]
4212 fake.startArgsForCall = append(fake.startArgsForCall, struct {
arg3 is heavy (152 bytes); consider passing it by pointer
3845 }{result1}
3846}
3847
3848func (fake *FakeBuild) SavePipeline(arg1 atc.PipelineRef, arg2 int, arg3 atc.Config, arg4 db.ConfigVersion, arg5 bool, arg6 bool) (db.Pipeline, bool, error) {3849 fake.savePipelineMutex.Lock()
3850 ret, specificReturn := fake.savePipelineReturnsOnCall[len(fake.savePipelineArgsForCall)]
3851 fake.savePipelineArgsForCall = append(fake.savePipelineArgsForCall, struct {
result1 is heavy (208 bytes); consider passing it by pointer
2941 }{result1}
2942}
2943
2944func (fake *FakeBuild) PrivatePlanReturnsOnCall(i int, result1 atc.Plan) {2945 fake.privatePlanMutex.Lock()
2946 defer fake.privatePlanMutex.Unlock()
2947 fake.PrivatePlanStub = nil
result1 is heavy (208 bytes); consider passing it by pointer
2932 fake.PrivatePlanStub = stub
2933}
2934
2935func (fake *FakeBuild) PrivatePlanReturns(result1 atc.Plan) {2936 fake.privatePlanMutex.Lock()
2937 defer fake.privatePlanMutex.Unlock()
2938 fake.PrivatePlanStub = nil
result1 is heavy (88 bytes); consider passing it by pointer
2884 }{result1, result2, result3}
2885}
2886
2887func (fake *FakeBuild) PreparationReturnsOnCall(i int, result1 db.BuildPreparation, result2 bool, result3 error) {2888 fake.preparationMutex.Lock()
2889 defer fake.preparationMutex.Unlock()
2890 fake.PreparationStub = nil
result1 is heavy (88 bytes); consider passing it by pointer
2873 fake.PreparationStub = stub
2874}
2875
2876func (fake *FakeBuild) PreparationReturns(result1 db.BuildPreparation, result2 bool, result3 error) {2877 fake.preparationMutex.Lock()
2878 defer fake.preparationMutex.Unlock()
2879 fake.PreparationStub = nil
args is heavy (264 bytes); consider passing it by pointer
2055 ExtraValues map[string]interface{}
2056}
2057
2058func createStartedBuild(tx Tx, build *build, args startedBuildArgs) error {2059 spanContext, err := json.Marshal(args.SpanContext)
2060 if err != nil {
2061 return err
config is heavy (152 bytes); consider passing it by pointer
1797func (b *build) SavePipeline(
1798 pipelineRef atc.PipelineRef,
1799 teamID int,
1800 config atc.Config,1801 from ConfigVersion,
1802 initiallyPaused bool,
1803 detach bool,
plan is heavy (208 bytes); consider passing it by pointer
560 return true, nil
561}
562
563func (b *build) start(tx Tx, plan atc.Plan) (bool, error) { 564 metadata, err := json.Marshal(plan)
565 if err != nil {
566 return false, err
plan is heavy (208 bytes); consider passing it by pointer
525 return !notChecked, nil
526}
527
528func (b *build) Start(plan atc.Plan) (bool, error) { 529 tx, err := b.conn.Begin()
530 if err != nil {
531 return false, err
Description
When a param big in size (more than 80 bytes) is passed to another function, it is better to pass a pointer to the value around, rather than the value itself.
Bad practice
func f(x [1024]int) {}
Recommended
func f(x *[1024]int) {}