Roger and Jan have given you good answers, but I would like to comment
on another aspect of your code.

* Sankar <sankar.curios...@gmail.com> [190415 04:53]:
> type weekday string
> 
> const (
>   Monday weekday = "Monday"
>   Tuesday = "Tuesday"
>   .
>   .
>   .
> )

Note that the type of Monday will be weekday, while the type of Tuesday
will be untyped string.  The spec allows omitting the expression list
after the first const declaration in a parenthesized list, but if you
omit the type, but not the expression list, the type is implied by the
expression, not by the type of the previous const.

...Marvin

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to