MCPcopy Create free account
hub / github.com/conforma/cli / SourceIsFile

Function SourceIsFile

internal/policy/source/git_config.go:35–37  ·  view source on GitHub ↗

SourceIsFile returns true if go-getter thinks the src looks like a file path. Ensuring that the src is not a git url is important because go-getter can think that a git url is a file path url.

(src string)

Source from the content-addressed store, hash-verified

33// Ensuring that the src is not a git url is important because go-getter can think
34// that a git url is a file path url.
35func SourceIsFile(src string) bool {
36 return detector.FileDetector(src)
37}
38
39// SourceIsGit returns true if go-getter thinks the src looks like a git url
40func SourceIsGit(src string) bool {

Callers 2

GetPolicyConfigFunction · 0.92
TestSourceIsFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSourceIsFileFunction · 0.68