DefaultVersion returns the default version of the specified module. If module is the empty string, it means the default module.
(c context.Context, module string)
| 76 | // DefaultVersion returns the default version of the specified module. |
| 77 | // If module is the empty string, it means the default module. |
| 78 | func DefaultVersion(c context.Context, module string) (string, error) { |
| 79 | req := &pb.GetDefaultVersionRequest{} |
| 80 | if module != "" { |
| 81 | req.Module = &module |
| 82 | } |
| 83 | res := &pb.GetDefaultVersionResponse{} |
| 84 | err := internal.Call(c, "modules", "GetDefaultVersion", req, res) |
| 85 | return res.GetVersion(), err |
| 86 | } |
| 87 | |
| 88 | // Start starts the specified version of the specified module. |
| 89 | // If either module or version are the empty string, it means the default. |
searching dependent graphs…