rating

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: GPL-3.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rating defines the game ratings the desktop shows: age ratings from rating boards and critic ratings from publications.

The age rating systems are ESRB for USA, ELSPA for Europe and Sega's own rating for Japan. Each system belongs to one supported region and has a display text for each of its rating codes. Any other system or code is not shown.

The critic rating sources are shown as each prints its scores: GamePro's categories, the average of EGM's four reviewers, the total of Famitsu's four reviewers, and the single score of the others. Any other source is not shown.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Age

func Age(ratings []content.AgeRating, regions []string) string

Age returns a game's age ratings, comma separated, such as "ESRB: K-A, ELSPA: 15+", in the order of the game's metadata regions: each rating is listed at the first region its system belongs to, and once. Only systems of supported regions the game has are listed, and a rating with an unknown system or code is left out. Returns "" when none is left.

Types

type CriticRow

type CriticRow struct {
	Source string
	Score  string
}

CriticRow is one shown critic rating: its source and its score text

func Critic

func Critic(ratings []content.CriticRating, regions []string) []CriticRow

Critic returns a game's critic ratings, one per source, grouped by supported region in the order of the game's metadata regions and in a fixed source order within a region, such as Famitsu "31 / 40" then SSM JP Readers "8.6614 / 10". A rating with an unknown source, a region the game does not have, or scores not shaped as its source prints is left out.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL