version

package
v2.0.0-...-49787b7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package version 提供版本的相关信息

依据 https://www.stats.gov.cn/sj/tjbz/tjyqhdmhcxhfdm/ 提供的数据, 以年作为单位进行更新,同时也以四位的年份作为版本号。

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidYear = fmt.Errorf("无效的版本号,必须是介于 [%d,%d] 之间的整数", start, latest)

ErrInvalidYear 无效的年份版本

年份只能介于 [2009, 当前年份-1) 的区间之间。

Functions

func All

func All() []int

All 返回支持的版本号列表

func BeginWith

func BeginWith(begin int) []int

BeginWith 从 begin 开始直到最新年份

func IsValid

func IsValid(year int) bool

IsValid 验证年份是否为一个有效的版本号

func Range

func Range(begin, end int) []int

Range 获取指定范围内的版本号

Types

This section is empty.

Jump to

Keyboard shortcuts

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