Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: simplified the declaration to get rid of "redundant type from array, slice, or map composite literal" error message #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: simplified the declaration to get rid of "redundant type fr…
…om array, slice, or map composite literal" error message
VERMA\verma committed Feb 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit a23a8ae22d9d3708618d59684de45d7f68ef3d3c
22 changes: 11 additions & 11 deletions 012_hands-on/01_hands-on/starting-code/main.go
Original file line number Diff line number Diff line change
@@ -32,14 +32,14 @@ func init() {

func main() {
years := []year{
year{
{
AcaYear: "2020-2021",
Fall: semester{
Term: "Fall",
Courses: []course{
course{"CSCI-40", "Introduction to Programming in Go", "4"},
course{"CSCI-130", "Introduction to Web Programming with Go", "4"},
course{"CSCI-140", "Mobile Apps Using Go", "4"},
{"CSCI-40", "Introduction to Programming in Go", "4"},
{"CSCI-130", "Introduction to Web Programming with Go", "4"},
{"CSCI-140", "Mobile Apps Using Go", "4"},
},
},
Spring: semester{
@@ -51,22 +51,22 @@ func main() {
},
},
},
year{
{
AcaYear: "2021-2022",
Fall: semester{
Term: "Fall",
Courses: []course{
course{"CSCI-40", "Introduction to Programming in Go", "4"},
course{"CSCI-130", "Introduction to Web Programming with Go", "4"},
course{"CSCI-140", "Mobile Apps Using Go", "4"},
{"CSCI-40", "Introduction to Programming in Go", "4"},
{"CSCI-130", "Introduction to Web Programming with Go", "4"},
{"CSCI-140", "Mobile Apps Using Go", "4"},
},
},
Spring: semester{
Term: "Spring",
Courses: []course{
course{"CSCI-50", "Advanced Go", "5"},
course{"CSCI-190", "Advanced Web Programming with Go", "5"},
course{"CSCI-191", "Advanced Mobile Apps With Go", "5"},
{"CSCI-50", "Advanced Go", "5"},
{"CSCI-190", "Advanced Web Programming with Go", "5"},
{"CSCI-191", "Advanced Mobile Apps With Go", "5"},
},
},
},
28 changes: 14 additions & 14 deletions 012_hands-on/02_solution/main.go
Original file line number Diff line number Diff line change
@@ -28,41 +28,41 @@ func init() {

func main() {
years := []year{
year{
{
AcaYear: "2020-2021",
Fall: semester{
Term: "Fall",
Courses: []course{
course{"CSCI-40", "Introduction to Programming in Go", "4"},
course{"CSCI-130", "Introduction to Web Programming with Go", "4"},
course{"CSCI-140", "Mobile Apps Using Go", "4"},
{"CSCI-40", "Introduction to Programming in Go", "4"},
{"CSCI-130", "Introduction to Web Programming with Go", "4"},
{"CSCI-140", "Mobile Apps Using Go", "4"},
},
},
Spring: semester{
Term: "Spring",
Courses: []course{
course{"CSCI-50", "Advanced Go", "5"},
course{"CSCI-190", "Advanced Web Programming with Go", "5"},
course{"CSCI-191", "Advanced Mobile Apps With Go", "5"},
{"CSCI-50", "Advanced Go", "5"},
{"CSCI-190", "Advanced Web Programming with Go", "5"},
{"CSCI-191", "Advanced Mobile Apps With Go", "5"},
},
},
},
year{
{
AcaYear: "2021-2022",
Fall: semester{
Term: "Fall",
Courses: []course{
course{"CSCI-40", "Introduction to Programming in Go", "4"},
course{"CSCI-130", "Introduction to Web Programming with Go", "4"},
course{"CSCI-140", "Mobile Apps Using Go", "4"},
{"CSCI-40", "Introduction to Programming in Go", "4"},
{"CSCI-130", "Introduction to Web Programming with Go", "4"},
{"CSCI-140", "Mobile Apps Using Go", "4"},
},
},
Spring: semester{
Term: "Spring",
Courses: []course{
course{"CSCI-50", "Advanced Go", "5"},
course{"CSCI-190", "Advanced Web Programming with Go", "5"},
course{"CSCI-191", "Advanced Mobile Apps With Go", "5"},
{"CSCI-50", "Advanced Go", "5"},
{"CSCI-190", "Advanced Web Programming with Go", "5"},
{"CSCI-191", "Advanced Mobile Apps With Go", "5"},
},
},
},