Skip to content

Interfaces - Wrong Code for Square Area #15

@dandago

Description

@dandago

Hi,

You've got this code in the Implement Square section of your Interfaces lesson:

type Square struct {
  side int
}

func (s Square) area() int {
  return s.square * s.square
}

I'm pretty sure the function should return s.side * s.side, as it does further down in the Full code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions