MCPcopy Create free account
hub / github.com/celer-pkg/celer / version

Method version

cmds/cmd_version.go:29–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func (v *versionCmd) version() {
30 toolchainPath, _ := filepath.Abs("toolchain_file.cmake")
31 toolchainPath = color.Sprintf(color.Important, "%s", toolchainPath)
32
33 content := fmt.Sprintf("Welcome to Celer (%s)\n"+
34 "--------------------------------------------\n"+
35 "This is a lightweight pkg-manager for C/C++.\n\n"+
36 "How to apply it in your cmake project: \n"+
37 "option1: %s\n"+
38 "option2: %s\n\n",
39 v.celer.Version(),
40 color.Sprintf(color.Title, "set(CMAKE_TOOLCHAIN_FILE \"%s\")", toolchainPath),
41 color.Sprintf(color.Title, "cmake .. -DCMAKE_TOOLCHAIN_FILE=\"%s\"", toolchainPath),
42 )
43 fmt.Print(content)
44}

Callers 1

CommandMethod · 0.95

Calls 3

SprintfFunction · 0.92
SprintfMethod · 0.80
VersionMethod · 0.65

Tested by

no test coverage detected