MCPcopy Index your code
hub / github.com/dagger/dagger / moduleAnalyticsProps

Function moduleAnalyticsProps

core/modfunc.go:967–986  ·  view source on GitHub ↗
(mod *Module, prefix string, props map[string]string)

Source from the content-addressed store, hash-verified

965}
966
967func moduleAnalyticsProps(mod *Module, prefix string, props map[string]string) {
968 props[prefix+"module_name"] = mod.Name()
969
970 source := mod.Source.Value.Self()
971 switch source.Kind {
972 case ModuleSourceKindLocal:
973 props[prefix+"source_kind"] = "local"
974 props[prefix+"local_subpath"] = source.SourceRootSubpath
975 case ModuleSourceKindGit:
976 git := source.Git
977 props[prefix+"source_kind"] = "git"
978 props[prefix+"git_symbolic"] = git.Symbolic
979 props[prefix+"git_clone_url"] = git.CloneRef // todo(guillaume): remove as deprecated
980 props[prefix+"git_clone_ref"] = git.CloneRef
981 props[prefix+"git_subpath"] = source.SourceRootSubpath
982 props[prefix+"git_version"] = git.Version
983 props[prefix+"git_commit"] = git.Commit
984 props[prefix+"git_html_repo_url"] = git.HTMLRepoURL
985 }
986}
987
988// loadContainerFromAddress loads a Container from a given address using the Address API.
989func loadContainerFromAddress(ctx context.Context, dag *dagql.Server, address string) (dagql.IDType, error) {

Callers 1

recordCallMethod · 0.85

Calls 2

SelfMethod · 0.80
NameMethod · 0.65

Tested by

no test coverage detected