style: fix formatting and indentation consistency
- Remove extra blank lines and fix indentation in test files - Ensure consistent struct field alignment in git types
This commit is contained in:
@@ -93,7 +93,6 @@ func TestGitFlagValidation(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func validateGitFlags(cli types.CLI) error {
|
func validateGitFlags(cli types.CLI) error {
|
||||||
|
|
||||||
gitFlags := []bool{cli.ChangesOnly, cli.Staged, cli.Unstaged}
|
gitFlags := []bool{cli.ChangesOnly, cli.Staged, cli.Unstaged}
|
||||||
@@ -119,7 +118,6 @@ func validateGitFlags(cli types.CLI) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type GitFlagError struct {
|
type GitFlagError struct {
|
||||||
message string
|
message string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,7 +118,6 @@ func TestIsInLineRanges(t *testing.T) {
|
|||||||
func TestIsInLineRangesEmptyRanges(t *testing.T) {
|
func TestIsInLineRangesEmptyRanges(t *testing.T) {
|
||||||
var emptyRanges []LineRange
|
var emptyRanges []LineRange
|
||||||
|
|
||||||
|
|
||||||
testLines := []int{1, 5, 10, 100}
|
testLines := []int{1, 5, 10, 100}
|
||||||
for _, lineNum := range testLines {
|
for _, lineNum := range testLines {
|
||||||
result := IsInLineRanges(lineNum, emptyRanges)
|
result := IsInLineRanges(lineNum, emptyRanges)
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
package git
|
package git
|
||||||
|
|
||||||
|
|
||||||
type GitStatus struct {
|
type GitStatus struct {
|
||||||
IsRepo bool
|
IsRepo bool
|
||||||
RootDir string
|
RootDir string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type FileStatus int
|
type FileStatus int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -15,14 +13,12 @@ const (
|
|||||||
StatusUntracked
|
StatusUntracked
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type FileChange struct {
|
type FileChange struct {
|
||||||
Path string
|
Path string
|
||||||
Status FileStatus
|
Status FileStatus
|
||||||
LineRanges []LineRange
|
LineRanges []LineRange
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type LineRange struct {
|
type LineRange struct {
|
||||||
Start int
|
Start int
|
||||||
End int
|
End int
|
||||||
|
|||||||
Reference in New Issue
Block a user