Copyright 2019 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

package frontend

import (
	

	
	
	
)
GetLatestInfo returns various pieces of information about the latest versions of a unit and module: - The linkable form of the minor version of the unit. - The latest module path and the full unit path of any major version found given the fullPath and the modulePath. It returns empty strings on error. It is intended to be used as an argument to middleware.LatestVersions.
func ( *Server) ( context.Context, ,  string,  *internal.UnitMeta) internal.LatestInfo {
	defer middleware.ElapsedStat(, "GetLatestInfo")()
It is okay to use a different DataSource (DB connection) than the rest of the request, because this makes self-contained calls on the DB.
	 := .getDataSource()

	,  := .GetLatestInfo(, , , )
	if  != nil {
		log.Errorf(, "Server.GetLatestInfo: %v", )
	} else {
		.MinorVersion = linkVersion(.MinorVersion, .MinorModulePath)
	}
	return