Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Go Language Go Language Overview Custom Types Structs

Need heelp pleeaase DD:

I having some trouble with this exercise... how I can solve it?

src/clock/clock.go
package clock

type Clock struct {
  Hours int
  Minutes int
}

func Noon(new *Clock) Clock {
  return *new{12, 0}
} 

1 Answer

Steven Parker
Steven Parker
229,744 Points

Here's a few hints:

  • this function won't take any arguments
  • you will not need a pointer (*) in this function
  • to create the new "Clock" you need to use the name "Clock" (but not the word "new")