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: formatter_basic.go
    path of file: ./repos/grafana/pkg/components/dashdiffs
    
    the code of the file until where you have to start completion: package dashdiffs

import (
	"bytes"
	"html/template"

	diff "github.com/yudai/gojsondiff"
)

// A BasicDiff holds the stateful values that are used when generating a basic
// diff from JSON tokens.
type BasicDiff struct {
	narrow     string
	keysIdent  int
	writing    bool
	LastIndent int
	Block      *BasicBlock
	Change     *BasicChange
	Summary    *BasicSummary
}

// A BasicBlock represents 
    
func (b *BasicDiff) handleTopLevelChange(line *JSONLine) (*BasicBlock, bool) {
	switch line.Change {
	case ChangeNil:
		if line.Change == ChangeNil {
			if line.Key != "" {
				b.Block = &BasicBlock{
					Title:  line.Key,
					Change: line.Change,
				}
			}
		}

	case ChangeAdded, ChangeDeleted:
		return &BasicBlock{
			Title:     line.Key,
			Change:    line.Change,
			New:       line.Val,
			LineStart: line.LineNum,
		}, true

	case ChangeOld:
		b.Block = &BasicBlock{
			Title:     line.Key,
			Old:       line.Val,
			Change:    line.Change,
			LineStart: line.LineNum,
		}

	case ChangeNew:
		b.Block.New = line.Val
		b.Block.LineEnd = line.LineNum

		// For every "old" change there is a corresponding "new", which
		// is why we wait until we detect the "new" change before
		// appending the change.
		return b.Block, true
	default:
		// ok
	}

	return nil, false
}