()
| 19 | ) |
| 20 | |
| 21 | func FullString() string { |
| 22 | dsBuilt := map[string]struct{}{} |
| 23 | dsExcluded := map[string]struct{}{} |
| 24 | |
| 25 | for ds, built := range component.Built { |
| 26 | if built { |
| 27 | dsBuilt[ds] = struct{}{} |
| 28 | continue |
| 29 | } |
| 30 | |
| 31 | dsExcluded[ds] = struct{}{} |
| 32 | } |
| 33 | |
| 34 | ret := fmt.Sprintf("version: %s\n", version.String()) |
| 35 | ret += fmt.Sprintf("Codename: %s\n", Codename) |
| 36 | ret += fmt.Sprintf("BuildDate: %s\n", version.BuildDate) |
| 37 | ret += fmt.Sprintf("GoVersion: %s\n", version.GoVersion) |
| 38 | ret += fmt.Sprintf("Platform: %s\n", version.System) |
| 39 | ret += fmt.Sprintf("libre2: %s\n", Libre2) |
| 40 | ret += fmt.Sprintf("User-Agent: %s\n", useragent.Default()) |
| 41 | ret += fmt.Sprintf("Constraint_parser: %s\n", constraint.Parser) |
| 42 | ret += fmt.Sprintf("Constraint_scenario: %s\n", constraint.Scenario) |
| 43 | ret += fmt.Sprintf("Constraint_api: %s\n", constraint.API) |
| 44 | ret += fmt.Sprintf("Constraint_acquis: %s\n", constraint.Acquis) |
| 45 | |
| 46 | built := "(none)" |
| 47 | |
| 48 | if len(dsBuilt) > 0 { |
| 49 | built = strings.Join(maptools.SortedKeys(dsBuilt), ", ") |
| 50 | } |
| 51 | |
| 52 | ret += fmt.Sprintf("Built-in optional components: %s\n", built) |
| 53 | |
| 54 | if len(dsExcluded) > 0 { |
| 55 | ret += fmt.Sprintf("Excluded components: %s\n", strings.Join(maptools.SortedKeys(dsExcluded), ", ")) |
| 56 | } |
| 57 | |
| 58 | return ret |
| 59 | } |
| 60 | |
| 61 | // StripTags removes any tag (-rc, ~foo3, .r1, etc) from a version string |
| 62 | func StripTags(version string) string { |
no test coverage detected
searching dependent graphs…