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/steampipe/pkg/task
    
    the code of the file until where you have to start completion: package task

import (
	"encoding/json"
	"fmt"
	"log"
	"os"
	"strings"

	"github.com/spf13/cobra"
	"github.com/turbot/go-kit/files"
	"github.com/turbot/steampipe/pkg/error_helpers"
	"github.com/turbot/steampipe/pkg/filepaths"
	"githu
    
func (r *Runner) saveAvailableVersions(cli *CLIVersionCheckResponse, plugin map[string]plugin.VersionCheckReport) error {
	utils.LogTime("Runner.saveAvailableVersions start")
	defer utils.LogTime("Runner.saveAvailableVersions end")

	if cli == nil && len(plugin) == 0 {
		// nothing to save
		return nil
	}

	notifs := &AvailableVersionCache{
		StructVersion: AvailableVersionsCacheStructVersion,
		CliCache:      cli,
		PluginCache:   plugin,
	}
	// create the file - if it exists, it will be truncated by os.Create
	f, err := os.Create(filepaths.AvailableVersionsFilePath())
	if err != nil {
		return err
	}
	defer f.Close()
	encoder := json.NewEncoder(f)
	return encoder.Encode(notifs)
}