从另一个本地包导入本地包

My project structure is like this:

MicroService-Server (project name and folder) 
    main.go
    ---model(folder name)
    ------ package model
    ---logics (folder name)
    -----campaigncreation (folder name)
    --------package campaigncreation
    -----utilities (folder name)
    --------package utilities
    ---controller (folder name)

I want to use "model" package in "campaigncreation", I tried various import statements but I get error for all of them:

import (
    model "././model"
)

import (
    model "./model"
)

import (
    model "MicroService-Server/model"
)

import (
    model "./model"
)

Relative imports are highly discouraged in Go community. It makes the code vague and error prone.

You should import any custom package starting from the $GOPATH/src/.... So, if your MicroService-Server resides like $GOPATH/src/MicroService-Server/, then you can import model package in campaigncreation easily like this:

import "MicroService-Server/model"

Here's a catch, if your MicroService-Server folder is not inside the $GOPATH, you can not import it. For this purpose of portability, you should use vendoring tools like the official "go mod" or third party glide.