MCPcopy
hub / github.com/wavetermdev/waveterm / GetLinuxStorageBackend

Function GetLinuxStorageBackend

pkg/secretstore/secretstore.go:301–322  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

299}
300
301func GetLinuxStorageBackend() (string, error) {
302 if runtime.GOOS != "linux" {
303 return "", nil
304 }
305
306 lock.Lock()
307 defer lock.Unlock()
308
309 if linuxStorageBackend != "" {
310 return linuxStorageBackend, nil
311 }
312
313 if err := getLinuxStorageBackend(); err != nil {
314 return "", err
315 }
316
317 if linuxStorageBackend == "" {
318 return "", fmt.Errorf("failed to determine linux storage backend")
319 }
320
321 return linuxStorageBackend, nil
322}

Calls 1

getLinuxStorageBackendFunction · 0.85

Tested by

no test coverage detected