Skip to content

custom package in go.mod #1

@Kushan-

Description

@Kushan-

hey i followed your tutorial from medium, and it's amazing. I was looking for that since months. A quick question though how can i mention custom package in go.mod file.
my directory structure is :-

src
- pkg
-- geometry.go
main.go

import in main,go looks like

import (  
    "fmt"
	"./pkg/geometry" //importing custom package
	"github.com/gorilla/mux"
	"net/http"
)

I am always get error
build command-line-arguments: cannot find module for path _/app/src/pkg/geometry
I followed couple of documentation/answer in stack overflow, but replace statement ain't working for me.

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