mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-09 23:09:24 +00:00
Decrease memory footprint by realigning struct members.
This commit is contained in:
+6
-6
@@ -51,10 +51,10 @@ type Wording struct {
|
||||
}
|
||||
|
||||
type Force struct {
|
||||
Commit string
|
||||
Patch int
|
||||
Minor int
|
||||
Major int
|
||||
Commit string
|
||||
Existing bool
|
||||
Strict bool
|
||||
}
|
||||
@@ -68,24 +68,24 @@ type SemVer struct {
|
||||
}
|
||||
|
||||
type Setup struct {
|
||||
RepositoryHandler *git.Repository
|
||||
RepositoryName string
|
||||
RepositoryLocalPath string
|
||||
RepositoryHandler *git.Repository
|
||||
LocalConfigFile string
|
||||
Wording Wording
|
||||
Force Force
|
||||
Commits []CommitDetails
|
||||
Tags []TagDetails
|
||||
Semver SemVer
|
||||
Wording Wording
|
||||
Force Force
|
||||
Generate bool
|
||||
LocalConfigFile string
|
||||
UseLocal bool
|
||||
}
|
||||
|
||||
type CommitDetails struct {
|
||||
Timestamp time.Time
|
||||
Hash string
|
||||
Author string
|
||||
Message string
|
||||
Timestamp time.Time
|
||||
}
|
||||
|
||||
type TagDetails struct {
|
||||
|
||||
+11
-11
@@ -52,8 +52,8 @@ func (suite *Tests) TestSetup_getSemver() {
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
fields fields
|
||||
want string
|
||||
fields fields
|
||||
}{
|
||||
{
|
||||
name: "Return 1.3.7",
|
||||
@@ -106,13 +106,13 @@ func (suite *Tests) TestSetup_getSemver() {
|
||||
|
||||
func (suite *Tests) TestSetup_ForcedVersioning() {
|
||||
type fields struct {
|
||||
Semver SemVer
|
||||
Force Force
|
||||
Semver SemVer
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
fields fields
|
||||
want string
|
||||
fields fields
|
||||
}{
|
||||
{
|
||||
name: "No versioning",
|
||||
@@ -211,8 +211,8 @@ func (suite *Tests) TestSetup_ReadConfig() {
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
fields fields
|
||||
args args
|
||||
fields fields
|
||||
wordingEmpty bool
|
||||
wantErr bool
|
||||
}{
|
||||
@@ -284,14 +284,14 @@ func (suite *Tests) Test_checkMatches() {
|
||||
|
||||
func (suite *Tests) TestSetup_ListCommits() {
|
||||
type fields struct {
|
||||
RepositoryHandler *git.Repository
|
||||
RepositoryName string
|
||||
RepositoryLocalPath string
|
||||
RepositoryHandler *git.Repository
|
||||
LocalConfigFile string
|
||||
Commits []CommitDetails
|
||||
Semver SemVer
|
||||
Wording Wording
|
||||
Force Force
|
||||
Commits []CommitDetails
|
||||
Semver SemVer
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
@@ -349,8 +349,8 @@ func (suite *Tests) TestSetup_ListCommits() {
|
||||
func (suite *Tests) TestSetup_CalculateSemver() {
|
||||
type fields struct {
|
||||
RepositoryName string
|
||||
Force Force
|
||||
LocalConfigFile string
|
||||
Force Force
|
||||
}
|
||||
type wantSemver struct {
|
||||
Major int
|
||||
@@ -584,14 +584,14 @@ func (suite *Tests) Test_parseExistingSemver() {
|
||||
|
||||
func (suite *Tests) TestSetup_ListExistingTags() {
|
||||
type fields struct {
|
||||
RepositoryHandler *git.Repository
|
||||
RepositoryName string
|
||||
RepositoryLocalPath string
|
||||
RepositoryHandler *git.Repository
|
||||
LocalConfigFile string
|
||||
Commits []CommitDetails
|
||||
Semver SemVer
|
||||
Wording Wording
|
||||
Force Force
|
||||
Commits []CommitDetails
|
||||
Semver SemVer
|
||||
}
|
||||
|
||||
tests := []struct {
|
||||
|
||||
Reference in New Issue
Block a user