Undefined Error in Golang

I have the following structure:

package gotime

type Now struct {
    dnow int
    ynow int
    mnow time.Month

And is there a function like:

func (n Now) DayNow() int {
    n.dnow = time.Now().Day()
    return n.dnow


I’m getting the following error when I want to call this package:

package main

import (

blah := Now

I get errors:

# command-line-arguments
.main.go:5: imported and not used: "_/C_/Users/ali/Desktop/test/gotime"
.main.go:10: undefined: Now

You can look at all of the package on GitHub:

Link for this package

How can I solve this problem?

Source: New Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.