diff --git a/src/gopheros/device/acpi/aml/parser_test.go b/src/gopheros/device/acpi/aml/parser_test.go index 2f514c9..ebd08b0 100644 --- a/src/gopheros/device/acpi/aml/parser_test.go +++ b/src/gopheros/device/acpi/aml/parser_test.go @@ -559,14 +559,14 @@ func TestParsePkgLength(t *testing.T) { func TestParsePkgLengthErrors(t *testing.T) { specs := [][]byte{ // lead byte bits (6:7) indicate 1 extra byte that is missing - []byte{1 << 6}, + {1 << 6}, // lead byte bits (6:7) indicate 2 extra bytes with the 1st and then 2nd missing - []byte{2 << 6}, - []byte{2 << 6, 0x1}, + {2 << 6}, + {2 << 6, 0x1}, // lead byte bits (6:7) indicate 3 extra bytes with the 1st and then 2nd and then 3rd missing - []byte{3 << 6}, - []byte{3 << 6, 0x1}, - []byte{3 << 6, 0x1, 0x2}, + {3 << 6}, + {3 << 6, 0x1}, + {3 << 6, 0x1, 0x2}, } for specIndex, spec := range specs { @@ -580,9 +580,9 @@ func TestParsePkgLengthErrors(t *testing.T) { func TestParseStringErrors(t *testing.T) { specs := [][]byte{ // Unexpected EOF before terminating null byte - []byte{'A'}, + {'A'}, // Characters outside the allowed [0x01, 0x7f] range - []byte{'A', 0xba, 0xdf, 0x00}, + {'A', 0xba, 0xdf, 0x00}, } for specIndex, spec := range specs { diff --git a/src/gopheros/device/driver_test.go b/src/gopheros/device/driver_test.go index 13f4a3f..769fe0d 100644 --- a/src/gopheros/device/driver_test.go +++ b/src/gopheros/device/driver_test.go @@ -11,10 +11,10 @@ func TestDriverInfoListSorting(t *testing.T) { }() origlist := []*DriverInfo{ - &DriverInfo{Order: DetectOrderACPI}, - &DriverInfo{Order: DetectOrderLast}, - &DriverInfo{Order: DetectOrderBeforeACPI}, - &DriverInfo{Order: DetectOrderEarly}, + {Order: DetectOrderACPI}, + {Order: DetectOrderLast}, + {Order: DetectOrderBeforeACPI}, + {Order: DetectOrderEarly}, } for _, drv := range origlist { diff --git a/src/gopheros/device/video/console/font/font_test.go b/src/gopheros/device/video/console/font/font_test.go index c2c8fd3..c631e36 100644 --- a/src/gopheros/device/video/console/font/font_test.go +++ b/src/gopheros/device/video/console/font/font_test.go @@ -8,8 +8,8 @@ func TestFindByName(t *testing.T) { }(availableFonts) availableFonts = []*Font{ - &Font{Name: "foo"}, - &Font{Name: "bar"}, + {Name: "foo"}, + {Name: "bar"}, } exp := availableFonts[1] @@ -28,10 +28,10 @@ func TestBestFit(t *testing.T) { }(availableFonts) availableFonts = []*Font{ - &Font{Name: "retina1", RecommendedWidth: 2560, RecommendedHeight: 1600, Priority: 2}, - &Font{Name: "retina2", RecommendedWidth: 2560, RecommendedHeight: 1600, Priority: 1}, - &Font{Name: "default", RecommendedWidth: 800, RecommendedHeight: 600, Priority: 0}, - &Font{Name: "standard", RecommendedWidth: 1024, RecommendedHeight: 768, Priority: 0}, + {Name: "retina1", RecommendedWidth: 2560, RecommendedHeight: 1600, Priority: 2}, + {Name: "retina2", RecommendedWidth: 2560, RecommendedHeight: 1600, Priority: 1}, + {Name: "default", RecommendedWidth: 800, RecommendedHeight: 600, Priority: 0}, + {Name: "standard", RecommendedWidth: 1024, RecommendedHeight: 768, Priority: 0}, } specs := []struct { diff --git a/src/gopheros/device/video/console/logo/gopher_128.go b/src/gopheros/device/video/console/logo/gopher_128.go index 7c4b651..b893e27 100644 --- a/src/gopheros/device/video/console/logo/gopher_128.go +++ b/src/gopheros/device/video/console/logo/gopher_128.go @@ -4,10 +4,10 @@ import "image/color" var ( gopher95x128 = Image{ - Width: 95, - Height: 128, - Align: AlignCenter, - TransparentIndex: 0, + Width: 95, + Height: 128, + Align: AlignCenter, + TransparentIndex: 0, Palette: []color.RGBA{ {R: 255, G: 0, B: 255}, {R: 228, G: 230, B: 227}, diff --git a/src/gopheros/device/video/console/logo/gopher_64.go b/src/gopheros/device/video/console/logo/gopher_64.go index 43317b9..ea33906 100644 --- a/src/gopheros/device/video/console/logo/gopher_64.go +++ b/src/gopheros/device/video/console/logo/gopher_64.go @@ -4,10 +4,10 @@ import "image/color" var ( gopher48x64 = Image{ - Width: 48, - Height: 64, - Align: AlignCenter, - TransparentIndex: 0, + Width: 48, + Height: 64, + Align: AlignCenter, + TransparentIndex: 0, Palette: []color.RGBA{ {R: 255, G: 0, B: 255}, {R: 228, G: 230, B: 227}, diff --git a/src/gopheros/device/video/console/logo/gopher_96.go b/src/gopheros/device/video/console/logo/gopher_96.go index b2d159e..190f5b4 100644 --- a/src/gopheros/device/video/console/logo/gopher_96.go +++ b/src/gopheros/device/video/console/logo/gopher_96.go @@ -4,10 +4,10 @@ import "image/color" var ( gopher71x96 = Image{ - Width: 71, - Height: 96, - Align: AlignCenter, - TransparentIndex: 0, + Width: 71, + Height: 96, + Align: AlignCenter, + TransparentIndex: 0, Palette: []color.RGBA{ {R: 255, G: 0, B: 255}, {R: 228, G: 230, B: 227}, diff --git a/src/gopheros/device/video/console/logo/logo_test.go b/src/gopheros/device/video/console/logo/logo_test.go index ca9df10..858083d 100644 --- a/src/gopheros/device/video/console/logo/logo_test.go +++ b/src/gopheros/device/video/console/logo/logo_test.go @@ -8,9 +8,9 @@ func TestBestFit(t *testing.T) { }(availableLogos) availableLogos = []*Image{ - &Image{Height: 64}, - &Image{Height: 96}, - &Image{Height: 128}, + {Height: 64}, + {Height: 96}, + {Height: 128}, } specs := []struct { diff --git a/src/gopheros/device/video/console/vesa_fb.go b/src/gopheros/device/video/console/vesa_fb.go index 096170b..57f71d6 100644 --- a/src/gopheros/device/video/console/vesa_fb.go +++ b/src/gopheros/device/video/console/vesa_fb.go @@ -517,22 +517,22 @@ func (cons *VesaFbConsole) loadDefaultPalette() { cons.palette = make(color.Palette, 256) egaPalette := []color.RGBA{ - color.RGBA{R: 0, G: 0, B: 0}, /* black */ - color.RGBA{R: 0, G: 0, B: 128}, /* blue */ - color.RGBA{R: 0, G: 128, B: 1}, /* green */ - color.RGBA{R: 0, G: 128, B: 128}, /* cyan */ - color.RGBA{R: 128, G: 0, B: 1}, /* red */ - color.RGBA{R: 128, G: 0, B: 128}, /* magenta */ - color.RGBA{R: 64, G: 64, B: 1}, /* brown */ - color.RGBA{R: 128, G: 128, B: 128}, /* light gray */ - color.RGBA{R: 64, G: 64, B: 64}, /* dark gray */ - color.RGBA{R: 0, G: 0, B: 255}, /* light blue */ - color.RGBA{R: 0, G: 255, B: 1}, /* light green */ - color.RGBA{R: 0, G: 255, B: 255}, /* light cyan */ - color.RGBA{R: 255, G: 0, B: 1}, /* light red */ - color.RGBA{R: 255, G: 0, B: 255}, /* light magenta */ - color.RGBA{R: 255, G: 255, B: 1}, /* yellow */ - color.RGBA{R: 255, G: 255, B: 255}, /* white */ + {R: 0, G: 0, B: 0}, /* black */ + {R: 0, G: 0, B: 128}, /* blue */ + {R: 0, G: 128, B: 1}, /* green */ + {R: 0, G: 128, B: 128}, /* cyan */ + {R: 128, G: 0, B: 1}, /* red */ + {R: 128, G: 0, B: 128}, /* magenta */ + {R: 64, G: 64, B: 1}, /* brown */ + {R: 128, G: 128, B: 128}, /* light gray */ + {R: 64, G: 64, B: 64}, /* dark gray */ + {R: 0, G: 0, B: 255}, /* light blue */ + {R: 0, G: 255, B: 1}, /* light green */ + {R: 0, G: 255, B: 255}, /* light cyan */ + {R: 255, G: 0, B: 1}, /* light red */ + {R: 255, G: 0, B: 255}, /* light magenta */ + {R: 255, G: 255, B: 1}, /* yellow */ + {R: 255, G: 255, B: 255}, /* white */ } // Load default EGA palette for colors 0-16 diff --git a/src/gopheros/device/video/console/vesa_fb_test.go b/src/gopheros/device/video/console/vesa_fb_test.go index 1fc1c2a..c956026 100644 --- a/src/gopheros/device/video/console/vesa_fb_test.go +++ b/src/gopheros/device/video/console/vesa_fb_test.go @@ -1622,8 +1622,8 @@ func TestVesaFbSetLogo(t *testing.T) { Align: logo.AlignLeft, TransparentIndex: 0, Palette: []color.RGBA{ - color.RGBA{R: 255, G: 0, B: 255}, - color.RGBA{R: 255, G: 0, B: 128}, + {R: 255, G: 0, B: 255}, + {R: 255, G: 0, B: 128}, }, Data: []byte{ 0x0, 0x1,