Vitalts / golangide

Automatically exported from code.google.com/p/golangide
0 stars 0 forks source link

(Windows 386) import path contains invalid character ':' #54

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download go.go1.windows-386.zip from 
http://code.google.com/p/go/downloads/list 

2. Extract ZIP file on the disk C:, so go.exe is located in C:\go\bin\

3. Create directory C:\gopathtest

4. Create text file C:\gopathtest\build.cmd with the following contents
==========================================
@echo off
set GOARCH=386
set GOOS=windows
set GOROOT=C:\go
%GOROOT%\pkg\tool\windows_386\8g unit1.go
if not exist unit1.8 goto _exit
%GOROOT%\pkg\tool\windows_386\8g main.go
if not exist main.8 goto _exit
%GOROOT%\pkg\tool\windows_386\8l -o test.exe main.8
if not exist test.exe goto _exit
test.exe
:_exit
==========================================

5. Create text file C:\gopathtest\unit1.go with the following contents
==========================================
package unit1
func Hello1() {
    print( "Hello1() from unit1 was called\n" )
}
==========================================

6. Create text file C:\gopathtest\main.go with the following contents
==========================================
package main
import "./unit1"
func main() {
    unit1.Hello1()
}
==========================================

7. Run build.cmd

What is the expected output? What do you see instead?

"Hello1() from unit1 was called" in stdout

Compiler error in main.go: 
==========================================
main.go:3: import path contains invalid character ':': "C:/gopathtest/unit1"
==========================================

What version of the product are you using? On what operating system?
"go version go1.0.1" 

Please provide any additional information below.

go\src\cmd\gc\subr.c:isbadimport() should be fixed to allow ':' character on 
Windows

Original issue reported on code.google.com by jinwei...@gmail.com on 9 May 2012 at 2:12

GoogleCodeExporter commented 8 years ago
use go build or liteide import gopkg project

Original comment by Visua...@gmail.com on 15 May 2012 at 3:08