IsUsingModules returns if go modules are enabled. It reads the current value of GO111MODULES.
()
| 116 | // |
| 117 | // It reads the current value of GO111MODULES. |
| 118 | func IsUsingModules() bool { |
| 119 | s := os.Getenv("GO111MODULE") |
| 120 | return s != "off" |
| 121 | } |
| 122 | |
| 123 | // |
| 124 |
no outgoing calls
searching dependent graphs…