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: cluster_template.go
    path of file: ./repos/rancher/pkg/api/norman/customization/clustertemplate
    
    the code of the file until where you have to start completion: package clustertemplate

import (
	"net/http"
	"sort"
	"time"

	v32 "github.com/rancher/rancher/pkg/apis/management.cattle.io/v3"

	"encoding/json"
	"fmt"

	"strings"

	"github.com/rancher/norman/api/access"
	"github.com/rancher/norman/httperror"
	"github.com/rancher/norman/types"
	"github.com/rancher/norman/types/convert"
	"github.com/rancher/norman/types/values"
	client "github.com/rancher/rancher/pkg/client/generated/management/v3"
	v3 "github.com/rancher/rancher/pkg/generated/norman/management.cattle.io/v3"
	"github.com/rancher/rancher/pkg/namespace"
	managementschema "github.com/rancher/rancher/pkg/schemas/management.cattle.io/v3"
	"github.com/sirupsen/logrus"
	apierrors "k8s.io/apimachinery/pkg/api/errors"
    
func (w Wrapper) BuildQuestionsFromSchema(schema *types.Schema, schemas *types.Schemas, pathTofield string) []v32.Question {
	questions := []v32.Question{}
	for name, field := range schema.ResourceFields {
		fieldType := field.Type
		if strings.HasPrefix(fieldType, "array") {
			fieldType = strings.Split(fieldType, "[")[1]
			fieldType = fieldType[:len(fieldType)-1]
		}
		checkSchema := schemas.Schema(&managementschema.Version, fieldType)
		if checkSchema != nil {
			subPath := name
			if pathTofield != "" {
				subPath = pathTofield + "." + name
			}
			subQuestions := w.BuildQuestionsFromSchema(checkSchema, schemas, subPath)
			if len(subQuestions) > 0 {
				questions = append(questions, subQuestions...)
			}
		} else {
			//add a Question
			newQuestion := v32.Question{}
			if field.Type == "password" {
				newQuestion.Group = "password"
			}
			newQuestion.Variable = name
			if pathTofield != "" {
				newQuestion.Variable = pathTofield + "." + name
			}
			newQuestion.Type = fieldType
			newQuestion.Description = field.Description
			newQuestion.Default = convert.ToString(field.Default)
			newQuestion.Required = field.Required
			questions = append(questions, newQuestion)
		}
	}
	return questions
}