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: release.go
    path of file: ./repos/hishtory/backend/server/internal/release
    
    the code of the file until where you have to start completion: package release

import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"strings"

	"github.com/ddworken/hishtory/shared"
)

// TODO: Can we get rid of this bit of mutable state by changing UpdateReleaseVersion to return the latest version?
var Version = "UNKNOWN"

type releaseInfo struct {
	Name string `json:"name"`
}

const releaseURL = "https://api.github.com/repos/ddworken/hishtory/releases/latest"

func UpdateReleaseVersion() error {
	resp, err := http.Get(releaseURL)
	if err != nil {
		return fmt.Errorf("failed to get latest release version: %w", err)
	}
	defer resp.Body.Close()
	respBody, err := io.ReadAll(resp.Body)
	if err != nil {
		return fmt.Errorf("failed to read github API response bod
    
func UpdateReleaseVersion() error {
	resp, err := http.Get(releaseURL)
	if err != nil {
		return fmt.Errorf("failed to get latest release version: %w", err)
	}
	defer resp.Body.Close()
	respBody, err := io.ReadAll(resp.Body)
	if err != nil {
		return fmt.Errorf("failed to read github API response body: %w", err)
	}
	if resp.StatusCode == 403 && strings.Contains(string(respBody), "API rate limit exceeded for ") {
		fmt.Printf("skipping updating release version due to 403 rate limiting err, body=%#v\n", string(respBody))
		return nil
	}
	if resp.StatusCode != 200 {
		return fmt.Errorf("failed to call github API, status_code=%d, body=%#v", resp.StatusCode, string(respBody))
	}
	var info releaseInfo
	err = json.Unmarshal(respBody, &info)
	if err != nil {
		return fmt.Errorf("failed to parse github API response: %w", err)
	}
	latestVersionTag := info.Name
	Version = decrementVersionIfInvalid(latestVersionTag)
	return nil
}