github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/moby/registry/config_windows.go (about)

     1  package registry // import "github.com/docker/docker/registry"
     2  
     3  import (
     4  	"os"
     5  	"path/filepath"
     6  	"strings"
     7  )
     8  
     9  // CertsDir is the directory where certificates are stored
    10  func CertsDir() string {
    11  	return os.Getenv("programdata") + `\docker\certs.d`
    12  }
    13  
    14  // cleanPath is used to ensure that a directory name is valid on the target
    15  // platform. It will be passed in something *similar* to a URL such as
    16  // https:\index.docker.io\v1. Not all platforms support directory names
    17  // which contain those characters (such as : on Windows)
    18  func cleanPath(s string) string {
    19  	return filepath.FromSlash(strings.Replace(s, ":", "", -1))
    20  }