Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 8de86c4

Browse files
committed
gps: Strings for calltypes
1 parent 6bbd19d commit 8de86c4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

internal/gps/source_manager.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,29 @@ const (
741741
ctExportTree
742742
)
743743

744+
func (ct callType) String() string {
745+
switch ct {
746+
case ctHTTPMetadata:
747+
return "Retrieving go get metadata"
748+
case ctListVersions:
749+
return "Retrieving latest version list"
750+
case ctGetManifestAndLock:
751+
return "Reading manifest and lock data"
752+
case ctListPackages:
753+
return "Parsing PackageTree"
754+
case ctSourcePing:
755+
return "Checking for upstream existence"
756+
case ctSourceInit:
757+
return "Initializing local source cache"
758+
case ctSourceFetch:
759+
return "Fetching latest data into local source cache"
760+
case ctExportTree:
761+
return "Writing code tree out to disk"
762+
default:
763+
panic("unknown calltype")
764+
}
765+
}
766+
744767
// callInfo provides metadata about an ongoing call.
745768
type callInfo struct {
746769
name string

0 commit comments

Comments
 (0)