Skip to content

Commit

Permalink
change scope of recType from private to public (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
JunNishimura committed Jun 15, 2023
1 parent 0dd9d42 commit 40ffb0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions internal/log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ import (
"github.com/JunNishimura/Goit/internal/sha"
)

type recordType int
type RecordType int

const (
CommitRecord recordType = iota
UndefinedRecord RecordType = iota
CommitRecord
CheckoutRecord
BranchRecord
)

func (t recordType) String() string {

func (t RecordType) String() string {
switch t {
case CommitRecord:
return "commit"
Expand All @@ -32,7 +34,7 @@ func (t recordType) String() string {
}

type record struct {
recType recordType
recType RecordType
from sha.SHA1
to sha.SHA1
name string
Expand All @@ -42,7 +44,7 @@ type record struct {
message string
}

func NewRecord(recType recordType, from, to sha.SHA1, name, email string, t time.Time, message string) *record {
func NewRecord(recType RecordType, from, to sha.SHA1, name, email string, t time.Time, message string) *record {
unixtime := fmt.Sprint(t.Unix())
_, offset := t.Zone()
offsetMinutes := offset / 60
Expand Down
2 changes: 1 addition & 1 deletion internal/log/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

func TestNewRecord(t *testing.T) {
type args struct {
recType recordType
recType RecordType
from sha.SHA1
to sha.SHA1
name string
Expand Down

0 comments on commit 40ffb0f

Please sign in to comment.