func createModule(mi *internal.ModuleInfo, licmetas []*licenses.Metadata, latestRequested bool) *Module {
	urlVersion := linkVersion(mi.Version, mi.ModulePath)
	if latestRequested {
		urlVersion = internal.LatestVersion
	}
	return &Module{
		DisplayVersion:    displayVersion(mi.Version, mi.ModulePath),
		LinkVersion:       linkVersion(mi.Version, mi.ModulePath),
		ModulePath:        mi.ModulePath,
		CommitTime:        elapsedTime(mi.CommitTime),
		IsRedistributable: mi.IsRedistributable,
		Licenses:          transformLicenseMetadata(licmetas),
		URL:               constructModuleURL(mi.ModulePath, urlVersion),
		LatestURL:         constructModuleURL(mi.ModulePath, middleware.LatestVersionPlaceholder),
	}
}
// createModule returns a *Module based on the fields of the specified
// versionInfo.
//
// latestRequested indicates whether the user requested the latest
// version of the package. If so, the returned Module.URL will have the
// structure /<path> instead of /<path>@<version>.
createModule returns a *Module based on the fields of the specified
versionInfo.

latestRequested indicates whether the user requested the latest
version of the package. If so, the returned Module.URL will have the
structure / instead of /@.
// createModule returns a * Module based on the fields of the specified // versionInfo . // // latestRequested indicates whether the user requested the latest // version of the package . If so the returned Module . URL will have the // structure / <path > instead of / <path > @<version > .
func createModule(mi *internal.ModuleInfo, licmetas []*licenses.Metadata, latestRequested bool) *Module {
	urlVersion := linkVersion(mi.Version, mi.ModulePath)
	if latestRequested {
		urlVersion = internal.LatestVersion
	}
	return &Module{
		DisplayVersion:    displayVersion(mi.Version, mi.ModulePath),
		LinkVersion:       linkVersion(mi.Version, mi.ModulePath),
		ModulePath:        mi.ModulePath,
		CommitTime:        elapsedTime(mi.CommitTime),
		IsRedistributable: mi.IsRedistributable,
		Licenses:          transformLicenseMetadata(licmetas),
		URL:               constructModuleURL(mi.ModulePath, urlVersion),
		LatestURL:         constructModuleURL(mi.ModulePath, middleware.LatestVersionPlaceholder),
	}
}
func createModule ( mi * internal . ModuleInfo , licmetas [ ] * licenses . Metadata , latestRequested bool ) * Module { urlVersion := linkVersion ( mi . Version , mi . ModulePath ) if latestRequested { urlVersion = internal . LatestVersion } return & Module { DisplayVersion : displayVersion ( mi . Version , mi . ModulePath ) , LinkVersion : linkVersion ( mi . Version , mi . ModulePath ) , ModulePath : mi . ModulePath , CommitTime : elapsedTime ( mi . CommitTime ) , IsRedistributable : mi . IsRedistributable , Licenses : transformLicenseMetadata ( licmetas ) , URL : constructModuleURL ( mi . ModulePath , urlVersion ) , LatestURL : constructModuleURL ( mi . ModulePath , middleware . LatestVersionPlaceholder ) , } }
createModule returns a *Module based on the fields of the specified
versionInfo.
createModule returns a * Module based on the fields of the specified versionInfo .