MCPcopy
hub / github.com/containers/toolbox / init

Function init

src/pkg/utils/utils.go:190–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188)
189
190func init() {
191 containerNamePrefixDefault = containerNamePrefixFallback
192 distroDefault = distroFallback
193 releaseDefault = releaseFallback
194
195 hostID, err := getHostID()
196 if err == nil {
197 if distroObj, supportedDistro := supportedDistros[hostID]; supportedDistro {
198 release, err := getDefaultReleaseForDistro(hostID)
199 if err == nil {
200 containerNamePrefixDefault = distroObj.ContainerNamePrefix
201 distroDefault = hostID
202 releaseDefault = release
203 }
204 }
205 }
206
207 ContainerNameDefault = containerNamePrefixDefault + "-" + releaseDefault
208}
209
210func CallFlatpakSessionHelper() (string, error) {
211 logrus.Debug("Calling org.freedesktop.Flatpak.SessionHelper.RequestSession")

Callers

nothing calls this directly

Calls 2

getHostIDFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…