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

import (
	"bufio"
	"fmt"
	"net/http"
	"runtime"
	"strings"

	"github.com/Masterminds/semver/v3"
	"github.com
    
func findChecksum(items []github.Asset) (algo checksum.Algorithm, expectedChecksum string, err error) {
	ext := "tar.gz"
	if runtime.GOOS == "windows" {
		ext = "zip"
	}
	suffix := fmt.Sprintf("%s-%s.%s", runtime.GOOS, runtime.GOARCH, ext)

	var checksumFileURL string
	for i := range items {
		if items[i].Name == "sha256sum.txt" {
			checksumFileURL = items[i].BrowserDownloadURL
			break
		}
	}
	if checksumFileURL == "" {
		return checksum.SHA256, "", errs.ErrChecksumFileNotFound
	}

	resp, err := http.Get(checksumFileURL)
	if err != nil {
		return checksum.SHA256, "", err
	}
	defer resp.Body.Close()

	if !httppkg.IsSuccess(resp.StatusCode) {
		return "", "", errs.NewURLUnreachableError(checksumFileURL, fmt.Errorf("%d", resp.StatusCode))
	}

	scanner := bufio.NewScanner(resp.Body)
	for scanner.Scan() {
		line := scanner.Text()
		if !strings.HasSuffix(line, suffix) {
			continue
		}
		return checksum.SHA256, strings.Fields(line)[0], nil
	}
	if err = scanner.Err(); err != nil {
		return checksum.SHA256, "", err
	}
	return checksum.SHA256, "", errs.ErrChecksumFileNotFound
}