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: update.go
    path of file: ./repos/owncast/controllers/admin
    
    the code of the file until where you have to start completion: package admin

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"os/exec"
	"strconv"
	"strings"

	"github.com/owncast/owncast/config"
	"github.com/owncast/owncast/controllers"
	log "github.com/sirupsen/logrus"
)

/*
The auto-update relies on some guesses and hacks to determine how the binary
is being run.

It determines if is running under systemd by asking systemd about the PID
and checking the parent pid or INVOCATION_ID property is set for it.

It also determines if the binary is running under a container by figuring out
the container ID as a fallback to refuse an in-place update within a container.

In general it's disabled for everyone and the features are enabled only if
specific conditions are met.

1. Can
    
func getContainerID() string {
	pid := os.Getppid()
	cgroupPath := fmt.Sprintf("/proc/%s/cgroup", strconv.Itoa(pid))
	containerID := ""
	content, err := os.ReadFile(cgroupPath) //nolint:gosec
	if err != nil {
		return containerID
	}
	lines := strings.Split(string(content), "\n")
	for _, line := range lines {
		field := strings.Split(line, ":")
		if len(field) < 3 {
			continue
		}
		cgroupPath := field[2]
		if len(cgroupPath) < 64 {
			continue
		}
		// Non-systemd Docker
		// 5:net_prio,net_cls:/docker/de630f22746b9c06c412858f26ca286c6cdfed086d3b302998aa403d9dcedc42
		// 3:net_cls:/kubepods/burstable/pod5f399c1a-f9fc-11e8-bf65-246e9659ebfc/9170559b8aadd07d99978d9460cf8d1c71552f3c64fefc7e9906ab3fb7e18f69
		pos := strings.LastIndex(cgroupPath, "/")
		if pos > 0 {
			idLen := len(cgroupPath) - pos - 1
			if idLen == 64 {
				// docker id
				containerID = cgroupPath[pos+1 : pos+1+64]
				return containerID
			}
		}
		// systemd Docker
		// 5:net_cls:/system.slice/docker-afd862d2ed48ef5dc0ce8f1863e4475894e331098c9a512789233ca9ca06fc62.scope
		dockerStr := "docker-"
		pos = strings.Index(cgroupPath, dockerStr)
		if pos > 0 {
			posScope := strings.Index(cgroupPath, ".scope")
			idLen := posScope - pos - len(dockerStr)
			if posScope > 0 && idLen == 64 {
				containerID = cgroupPath[pos+len(dockerStr) : pos+len(dockerStr)+64]
				return containerID
			}
		}
	}
	return containerID
}