#golangci-lint complains in vscode on a go project created outside ~/go folder

4 messages · Page 1 of 1 (latest)

plush hawk
#

Hello I get the following error undefined: logging.printRamdomly compiler (UndeclaredImportedName) having the following project structure:

// myproject/main.go
package main

import (
    "fmt"
    logging "github.com/user/myproject/logging"
)

func main() {
    logging.printRamdomly() // error in this line
    fmt.Println("Hello, World!")
}
// myproject/logging/logging.go
package logging

func printRamdomly() string {
    ramdom_word := "word"
    return ramdom_word
}

Any help is very welcome

Thank you so much in advance

plush hawk
#

Upper case and it solved the issue