go函数中的包选择错误

I am learning from a book the book says to add a couple lines of code, but it throws an error

package main

import (
   "./lissajous"
   "log"
   "net/http" 
)

func main() {

   handler := func(w http.ResponseWriter, r *http.Request) {
        lissajous(w)
   }
   http.HandleFunc("/", handler) // each request calls handler
   log.Fatal(http.ListenAndServe("localhost:8000", nil))
}

it throws this error

./server.go:6: imported and not used:
"_/home/zach/Dropbox/Personal/Go_Programming
         /The_Go_Programming_Language/ch01/web/lissajous"
./server.go:14: use of package lissajous without selector

the package directory I think is correct, but can't seem to call functions, the set up for the handler is just like that in the book am I missing something?

any help appreciated?

Here are 2 things:

  • Go doesn't allow unused imports - if you import module you should use it, or temporarily comment out

  • another way of custom module creation and import recommended. Think like once you will publish it and treat it as being already published. Choose an unique URL for it like github.com/login/repo/super-package/package. However if you are not obliged to publish it right now neither in open source nor private repo. It's recommended to keep it like this in your system. It'lll be easier to start sharing it with colleagues and possibly publish if you wish.