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: display.go
    path of file: ./repos/cds/cli
    
    the code of the file until where you have to start completion: package cli

import (
	"context"
	"fmt"
	"os"
	"strings"
	"time"

	surterm "gopkg.in/AlecAivazis/survey.v1/terminal"

	"golang.org/x/crypto/ssh/terminal"
)

// Display helps you to display message on a terminal
type Display string

// Printf update the displayed message
func (d *Display) Printf(form
    
func (d *Display) Do(ctx context.Context) {
	clear := "\r"
	w, _, _ := terminal.GetSize(1)
	for i := 0; i < w; i++ {
		clear += " "
	}

	cursor := surterm.Cursor{Out: os.Stdout}

	var count int
	go func(d *Display) {
		for {
			time.Sleep(100 * time.Millisecond)
			if *d == "" || ctx.Err() != nil {
				continue
			}

			for i := 0; i < count-1; i++ {
				fmt.Print(clear)
				cursor.PreviousLine(1)
			}
			count = len(strings.Split(string(*d), "\n"))

			fmt.Printf("%s\r%s", clear, string(*d))
			*d = ""
		}
	}(d)
}