From f0ef73922f486a06f2289941ffd5520e6dac55f8 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 22 Sep 2023 17:00:15 +0800 Subject: [PATCH] fix: typo Signed-off-by: guoguangwu --- pkg/personname/common.go | 2 +- read_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/personname/common.go b/pkg/personname/common.go index bb2edb76..8139393a 100644 --- a/pkg/personname/common.go +++ b/pkg/personname/common.go @@ -20,7 +20,7 @@ func renderWithSeps(sections []string, separator string, nullSepLevel uint) stri // Add the section to the dcm string dcmString = section + dcmString - // If this section is non-emtpy, we need to add all remaining separators, so + // If this section is non-empty, we need to add all remaining separators, so // remember that we have encountered a non-zero value. if section != "" { nonZeroFound = true diff --git a/read_test.go b/read_test.go index b8fe8002..16f8edd2 100644 --- a/read_test.go +++ b/read_test.go @@ -690,7 +690,7 @@ func TestReadHeader_TryAllowErrorMetaElementGroupLength(t *testing.T) { t.Run("NoFileMetaInformationGroupLength", func(t *testing.T) { dcmheaderNoInfoGrpLen, err := headerWithNoFileMetaInformationGroupLength() if err != nil { - t.Fatalf("unsuccesful generation of fake header data") + t.Fatalf("unsuccessful generation of fake header data") } else { r := &reader{ rawReader: dicomio.NewReader(bufio.NewReader(dcmheaderNoInfoGrpLen.HeaderBytes), binary.LittleEndian, int64(dcmheaderNoInfoGrpLen.HeaderBytes.Len())), @@ -711,7 +711,7 @@ func TestReadHeader_TryAllowErrorMetaElementGroupLength(t *testing.T) { t.Run("WithFileMetaInformationGroupLength", func(t *testing.T) { dcmHeaderInfoGrpLen, err := headerWithFileMetaInformationGroupLength() if err != nil { - t.Fatalf("unsuccesful generation of fake header data with FileMetaInformationGroupLength") + t.Fatalf("unsuccessful generation of fake header data with FileMetaInformationGroupLength") } else { r := &reader{ rawReader: dicomio.NewReader(bufio.NewReader(dcmHeaderInfoGrpLen.HeaderBytes), binary.LittleEndian, int64(dcmHeaderInfoGrpLen.HeaderBytes.Len())), @@ -720,7 +720,7 @@ func TestReadHeader_TryAllowErrorMetaElementGroupLength(t *testing.T) { r.rawReader.SetTransferSyntax(binary.LittleEndian, true) wantElements, err := r.readHeader() if err != nil { - t.Errorf("unsuccesful readHeader when parse option %v is turned on and header has no MetaElementGroupLength tag", opts.allowMissingMetaElementGroupLength) + t.Errorf("unsuccessful readHeader when parse option %v is turned on and header has no MetaElementGroupLength tag", opts.allowMissingMetaElementGroupLength) } // Ensure dataset read from readHeader and the test header are the same except for the ValueLength field. if diff := cmp.Diff(wantElements, dcmHeaderInfoGrpLen.Elements, cmp.AllowUnexported(allValues...), cmpopts.IgnoreFields(Element{}, "ValueLength")); diff != "" {