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: segment_config_maker.go
    path of file: ./repos/wal-g/internal/databases/greenplum
    
    the code of the file until where you have to start completion: package greenplum

import (
	"encoding/json"
	"fmt"
	"io"
	"os"

	"github.com/greenplum-db/gp-common-go-libs/cluster"
	"github.com/wal-g/wal-g/utility"
)

type SegConfigMaker interface {
	Make(SegmentMetadata) (cluster.SegConfig, error)
}

type RestoreCfgSegMaker struct {
	restoreCfg Cluste
    
func NewSegConfigMaker(restoreCfgPath string, inPlaceRestore bool) (SegConfigMaker, error) {
	if inPlaceRestore {
		return &InPlaceSegMaker{}, nil
	}

	file, err := os.Open(restoreCfgPath)
	if err != nil {
		return nil, fmt.Errorf("failed to open the provided restore config file: %v", err)
	}
	defer utility.LoggedClose(file, "")

	return NewRestoreCfgSegMaker(file)
}