You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pod_template.go
    path of file: ./repos/octant/internal/printer
    
    the code of the file until where you have to start completion: /*
Copyright (c) 2019 the Octant contributors. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/

package printer

import (
	"context"

	"github.com/pkg/errors"
	corev1 "k8s.io/api/core/v1"
	"k8s.io/apimachinery/pkg/runtime"

	"github.com/vmware-tanzu/octant/pkg/view/component"
	"github.com/vmware-tanzu/octant/pkg/view/flexlayout"
)

type podTemplateLayoutOptions struct {
	parent          runtime.Object
	containers      []corev1.Container
	podTemplateSpec corev1.PodTemplateSpec
	isInit          bool
	printOptions    Options
}

type podTemplateFunc func(ctx context.Context, fl *flexlayout.FlexLayout, options podTemplateLayoutOptions) error

type PodTemplate struct {
	
    
func podTemplatePodConfiguration(ctx context.Context, fl *flexlayout.FlexLayout, options podTemplateLayoutOptions) error {
	podSection := fl.AddSection()

	volumeTable, err := printVolumes(options.podTemplateSpec.Spec.Volumes)
	if err != nil {
		return errors.Wrap(err, "print volumes")
	}
	if !volumeTable.IsEmpty() {
		if err := podSection.Add(volumeTable, component.WidthHalf); err != nil {
			return err
		}
	}

	tolerationList, err := printTolerations(options.podTemplateSpec.Spec)
	if err != nil {
		return errors.Wrap(err, "print tolerations")
	}
	if !tolerationList.IsEmpty() {
		if err := podSection.Add(tolerationList, component.WidthHalf); err != nil {
			return err
		}
	}

	affinityList, err := printAffinity(options.podTemplateSpec.Spec)
	if err != nil {
		return errors.Wrap(err, "print affinities")
	}
	if !affinityList.IsEmpty() {
		if err := podSection.Add(affinityList, component.WidthHalf); err != nil {
			return err
		}
	}

	return nil
}