#The Server properties is unknown

7 messages · Page 1 of 1 (latest)

cedar ember
#

The NewServer is located in the main package, so I imported the package types, but why is the field still unknown?

mild hornet
#

because the field is private

#

in go if the first letter is lower case that private (only accessible in the same scope as where it's defined)

#

if it's upper case it's public

graceful shell
graceful shell
cedar ember
#

may i ask if this structure is fine, i wanted to separate the routing and controllers but struggling to implement it. And since i cannot import the package main i decided to separate the Server struct and put it inside type.go