Documentation ¶ Overview ¶ Package version 能夠協助你標註服務的版本號碼。 Index ¶ type Version func Define(major, minor, patch int, branch string) Version func (v Version) String() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Version ¶ type Version struct { // Major 是一個不符合相容性的 API 重大改變版本號。 Major int // Minor 是符合相容性的新功能版本號。 Minor int // Patch 是符合相容性的 Bug 修正版本號。 Patch int // Branch 是版本的開發分歧,如 `dev` 或 `stable`。 Branch string } Version 呈現了一個版本的詳細資訊。 func Define ¶ func Define(major, minor, patch int, branch string) Version Define 定義了一個版本資訊。 func (Version) String ¶ func (v Version) String() string String 會將版本資訊轉換成類似 `1.0.0+dev` 的字串。 Source Files ¶ View all Source files version.go Click to show internal directories. Click to hide internal directories.