package auth import ( "encoding/base64" "net/http" "git.unkin.net/unkin/artifactapi/pkg/models" ) func BasicHeaders(remote models.Remote) http.Header { h := http.Header{} if remote.Username != "" { h.Set("Authorization", "Basic "+base64.StdEncoding.EncodeToString( []byte(remote.Username+":"+remote.Password), )) } return h }