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: image_formatter.go
    path of file: ./repos/dry/docker/formatter
    
    the code of the file until where you have to start completion: package formatter

import (
	"strings"

	"github.com/docker/docker/api/types"
	"github.com/docker/go-units"
	"github.com/moncho/dry/docker"
)

const (
	imageIDHeader = "IMAGE ID"
	repository    = "REPOSITORY"
	tag           = "TAG"
	digest        = "DIGEST"
	createdSince  = "CREATEDSINCE"
	size          = "SIZE"
)

// ImageFormatter knows how to pretty-print the information of an image
type ImageFormatter struct {
	trunc  bool
	header []string
	image  types.ImageSummary
}

// NewImageFormatter creates an image formatter
f
    
func (formatter *ImageFormatter) Repository() string {
	formatter.addHeader(repository)
	if len(formatter.image.RepoTags) > 0 {
		tagPos := strings.LastIndex(formatter.image.RepoTags[0], ":")
		if tagPos > 0 {
			return formatter.image.RepoTags[0][:tagPos]
		}
		return formatter.image.RepoTags[0]
	} else if len(formatter.image.RepoDigests) > 0 {
		tagPos := strings.LastIndex(formatter.image.RepoDigests[0], "@")
		if tagPos > 0 {
			return formatter.image.RepoDigests[0][:tagPos]
		}
		return formatter.image.RepoDigests[0]
	}

	return "<none>"
}