Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i got a problem, it feel like a resource bug, someone please help me #35980

Closed
olderone opened this issue Dec 5, 2019 · 6 comments
Closed

i got a problem, it feel like a resource bug, someone please help me #35980

olderone opened this issue Dec 5, 2019 · 6 comments

Comments

@olderone
Copy link

olderone commented Dec 5, 2019

What version of Go are you using (go version)?

$ go version
go version go1.13.3 windows/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

Windows

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ma\AppData\Local\go-build
set GOENV=C:\Users\ma\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=F:\wp\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\ma\soft\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\ma\soft\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\ma\AppData\Local\Temp\go-build601014506=/tmp/go-build -gno-record-gcc-switches

What did you do?

newDbName = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root\\test.db"
path = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root"
dmt := fmt.Sprintf("/c %s&cd %s&sqlite3.exe %s \".read tmp.sql\"", path[0:2], path, newDbName)
cmd := exec.Command("cmd.exe", dmt)
out1, err := cmd.CombinedOutput()
if err != nil{
	fmt.Println(err)
}

What did you expect to see?

make a new db file,
C:\Users\ma\Desktop\sqlite3\malformed\root\test.db

What did you see instead?

Error: unrecognized token: "".read"

@olderone olderone changed the title i got a problem i got a problem, it feel like a resource bug, someone please help me Dec 5, 2019
@ianlancetaylor
Copy link
Contributor

On this line

dmt := fmt.Sprintf("/c %s&cd %s&sqlite3.exe %s ".read tmp.sql"", path[0:2], path, newDbName)

your string ends at the " before .read. Use a raw string literal or put a backslash before the ".

In general we use the issue tracker for bugs. You will get better and faster help with using Go if you use a forum rather than the issue tracker. See https://golang.org/wiki/Questions. Thanks.

@olderone
Copy link
Author

olderone commented Dec 5, 2019

like this, still has that problem.

newDbName = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root\\test.db"
path = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root"
dmt := fmt.Sprintf(`%s&cd %s&sqlite3.exe %s ".read tmp.sql"`, path[0:2], path, newDbName)
cmd := exec.Command("cmd.exe", dmt)
out1, err := cmd.CombinedOutput()
if err != nil{
	fmt.Println(err)
}

@olderone
Copy link
Author

olderone commented Dec 5, 2019

this too

newDbName = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root\\test.db"
path = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root"
dmt := fmt.Sprintf("/c %s&cd %s&sqlite3.exe %s \".read tmp.sql\"", path[0:2], path, newDbName)
cmd := exec.Command("cmd.exe", dmt)
out1, err := cmd.CombinedOutput()
if err != nil{
	fmt.Println(err)
}

@ianlancetaylor
Copy link
Contributor

Please see https://golang.org/wiki/Questions.

@olderone
Copy link
Author

olderone commented Dec 5, 2019

i'm in China, i can't open that website

@ianlancetaylor
Copy link
Contributor

Asking Questions
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see:

Stack Overflow with questions tagged "go"

The Go Forum, a web-based forum

Gophers Slack, use the invite app for access. The #general channel is a good starting point.

Go Community on Hashnode with questions and posts tagged with "go"

The golang-nuts mailing list

IRC channel #go-nuts on Freenode

If we closed your issue as a question with a link to this wiki, we apologize. Please ask the question on one of the above forums.

@golang golang locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants