0

Project Structure:

-MakeFile
-DockerFileForLogging
-DockerFileForMonitor
-Logging
   -go files
   -go.mod 
-Monitor
   -go files
   -go.mod

When I try to generate and run test on this project, I get Main module does not contain package /*/**/.../Logging.

Command :

    go test -race -coverprofile=coverage.out ./logging/...
    go test -race -coverprofile=coverage.out ./monitor/...

Tried multiple commands but I keep getting different errors.

1
  • did you mean to say multiple modules? Commented Jan 10, 2022 at 9:05

1 Answer 1

1

Instead of using ..., I believe the correct one would be *

Like the example:

go test -race -coverprofile=coverage.out ./logging/*
go test -race -coverprofile=coverage.out ./monitor/*

In this documentation you can get some details to understand better.

https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.