Skip to main content

Go error: go : go.mod file not found in current directory or any parent directory; (working on GOPATH/src)

As of Go 1.16, the GO111MODULE environment variable is treated as "on" by default, meaning Go expects to find a go.mod file, and no longer falls back to pre-module GOPATH behavior.

If you want to go back to the pre-1.16 behavior, you now have to explicitly specify GO111MODULE=auto, but you're far better off creating a go.mod file.

See https://golang.org/doc/go1.16#go-command and https://golang.org/ref/mod


Source - https://stackoverflow.com/questions/67929883/go-error-go-go-mod-file-not-found-in-current-directory-or-any-parent-director 

Comments

Popular Posts

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the newbies of Linux. 1. Found out i had to set the date like this:    # date -s 2007.04.08-22:46+0000 2. Mounting     sudo mount -t cifs // < pingable_host_or_ip > / < win_share_name > /build -o user= ,domain= ,uid=string,gid=string 3. To install linux packages from internet (ubuntu only)     apt-get install 4. To determine what ports the machine is currently listening on     netstat -an | grep -i listen | less 5. Find in files in Linux     find . | xargs grep 'string' -sl 6. To become superuser/root     sudo -i 7. To find a running process using name ps -aef | grep "searchstring" 8. Alt + F2 opens run window in RHEL 9. To access windows share from linux smb:// /d$ 10. To know the last reboot date & time $ last reboot | head -1 11. To install RPM packages in RHEL rpm -ivh 12. To un-install RPM package in RHEL rpm -e 13. To display Linux Kerne

How to change the default pdf viewer application in your Mac or MacBook

  To  set  a  PDF viewer  as the  default  on  Mac  OS X: Select any  PDF  file from Finder. Control-click to open the menu. ...  Choose Get Info from the menu that opens. ...  From the Open with: section in the new window that opens, select your preferred application, such as Adobe  Reader  or Preview. ...  Click the  Change  All button.

ಮ್ಯಾಕ್ ಬುಕ್ ಮತ್ತು ವಿನ್ಡೋಸ್ ಲ್ಯಾಪ್ ಟಾಪ್ ನಲ್ಲಿ ಎಲ್ಲ ಆಪ್ ಗಳಲ್ಲಿ ಕನ್ನಡ ಟೈಪ್ ಮಾಡುವುದು ಹೇಗೆ ?? How to type kannada on any app in Mac OS and Windows laptops

 ಮ್ಯಾಕ್ ಬುಕ್ ನಲ್ಲಿ ಕನ್ನಡ ದಲ್ಲಿ ಟೈಪ್ ಮಾಡಲು ಲಿಪಿಕ ಎನ್ನುವ ಈ ಕೆಳಗಿನ ಲಿಂಕ್ ಅನ್ನು ಕ್ಲಿಕ್ ಮಾಡಿ .pkg ಫೈಲ್ ಅನ್ನು ಡೌನ್ ಲೋಡ್ ಮಾಡಿ ಅದನ್ನು ಇನ್ಸ್ತಾಲ್ ಮಾಡಿಕೊಳ್ಳಿ. ಇನ್ಸ್ತಾಲ್ ಮಾಡಿದ ಮೇಲೆ ಅಪ್ಪ್  ಅನ್ನು ಒಪೆನ್ ಮಾಡಿ.    ಲಿಪಿಕಾ ಆಪ್    ಟಾಸ್ಕ್  ಬಾರ್ ನಲ್ಲಿ 'A' ಎನ್ನುವ ಐಕಾನ್ ಅನ್ನು ಕ್ಲಿಕ್ ಮಾಡಿ. ಲಿಪಿಕಾ ಐಮ್ಈ ಅನ್ನು ಕ್ಲಿಕ್ ಮಾಡಿ. ಕನ್ನಡ ಭಾಷೆಯನ್ನು ಆಯ್ಕೆ ಮಾಡಿ.  ಆ ನಂತರ ಯಾವುದೇ ಮ್ಯಾಕ್ OS ಆಪ್ ನಲ್ಲಿ ನೀವು  ಕನ್ನಡದಲ್ಲಿ ಟೈಪ್ ಮಾಡಬಹುದು.  ಕೇವಲ ಕ್ರೊಮ್ ವೆಬ್ ಬ್ರೌಸರ್ ನಲ್ಲಿ ನಿಮಗೆ ಕನ್ನಡ ಟೈಪ್ ಮಾಡಬೇಕಾದಲ್ಲಿ ಈ ಕೆಳಗಿನ ಲಿಂಕ್ ಅನ್ನು ಕ್ಲಿಕ್ ಮಾಡಿ  ಗೂಗಲ್ ಇನ್ಪುಟ್ ಮೆಥಡ್  (Google Input Method) ಗೂಗಲ್ ಕ್ರೊಮ್ ಎಕ್ಸ್ ಟೆನ್ಷನ್ ಅನ್ನು ಇನ್ಸ್ತಾಲ್ ಮಾಡಿಕೊಳ್ಳಿ. ಅದನ್ನು ಒಪೆನ್ ಮಾಡಿ ಕನ್ನಡ ಭಾಷೆ ಯನ್ನು ಆಡ್ ಮಾಡಿಕೊಳ್ಳಿ.  ವೆಬ್ ಬ್ರೌಸರ್ ನಲ್ಲಿ ನಿಮಗೆ ಕನ್ನಡ ಟೈಪ್ ಮಾಡಬೇಕಾದಲ್ಲಿ ಈ ನೀಲಿ ಕೀ ಬೋರ್ಡ್ ಐಕಾನ್ ಅನ್ನು ಬುಕ್ಮಾರ್ಕ್ ಬಾರ್ ನಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ ಕನ್ನಡ ಫೊನೆಟಿಕ್ ಆಪ್ಷನ್ ಅನ್ನು ಆಯ್ಕೆ ಮಾಡಿ.  ಕನ್ನಡ ಟೈಪಿಂಗ್ ಅನ್ನು ಮ್ಯಾಕ್ ಬುಕ್ ಮತ್ತು ವಿನ್ಡೋಸ್ ಲ್ಯಾಪ್ ಟಾಪ್ ಬ್ರೌಸರ್ ನಲ್ಲಿ ಆನಂದಿಸಿ.  ಮೈಕ್ರೊಸಾಫ್ಟ್  ವಿನ್ಡೋಸ್ ನಲ್ಲಿ ಯಾವ ಆಪ್ ನಲ್ಲಿ ಬೇಕಾದರೂ ಕನ್ನಡ ಟೈಪ್ ಮಾಡಲು ನಿಮಗೆ ಎರಡು ಆಯ್ಕೆ ಇವೆ: ೧. ಫೊನೆಟಿಕ್ ಕನ್ನಡ ಟೈಪ್ ಮಾಡಲು