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

import (
	"encoding/binary"
	"io"
	"os"
	"path"

	"github.com/wal-g/tracelog"
)

const pgControlSize = 8192

// PgControlData represents data contained in pg_control file
type PgControlData struct {
	systemIdentifier uint64 // systemIdentifier represents system ID of PG cluster (f.e. [0-8] bytes in pg_control)
	currentTimeline  uint32 // currentTimeline represents current timeline of PG cluster (f.e. [48-52] bytes in pg_contro
    
func ExtractPgControl(folder string) (*PgControlData, error) {
	pgControlReadCloser, err := os.Open(path.Join(folder, PgControlPath))
	if err != nil {
		return nil, err
	}

	result, err := extractPgControlData(pgControlReadCloser)
	if err != nil {
		closeErr := pgControlReadCloser.Close()
		tracelog.WarningLogger.Printf("Error on closing pg_control file: %v\n", closeErr)
		return nil, err
	}

	err = pgControlReadCloser.Close()
	if err != nil {
		return nil, err
	}

	return result, nil
}