Revert "Updated Questions (markdown)"

This reverts commit e5a7db38a5ca41e6aa86b6e37b98591fab998096.
Dominik Honnef 2022-06-19 00:16:21 +02:00
parent e5a7db38a5
commit 25958b281f
2 changed files with 26 additions and 49 deletions

26
Questions.md Normal file

@ -0,0 +1,26 @@
# 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](https://go.dev/s/proposal-process) only.
For asking questions, see:
* [The official Q&A channel for Google's Go Programming Language
](https://stackoverflow.com/collectives/go) on Stack Overflow
* [Stack Overflow](https://stackoverflow.com/questions/tagged/go) with questions tagged "go" or "golang" (complementing the Go Collective mentioned before)
* [The Go Forum](https://forum.golangbridge.org/), a web-based forum
* [Gophers Slack](https://gophers.slack.com), use the [invite app](https://invite.slack.golangbridge.org/) for access. The `#general` channel is a good starting point.
* [Go Community on Hashnode](https://hashnode.com/n/go) with questions and posts tagged with "go"
* [The golang-nuts mailing list](https://groups.google.com/d/forum/golang-nuts)
* [Subreddit for Go](https://www.reddit.com/r/golang/)
* **IRC** channel #go-nuts on Libera
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.
Please do not write your question on a wiki page. Please use one of the above forums.

@ -1,49 +0,0 @@
What version of Go are you using (go version)?
$ go version 1.18.2
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
linux & windows , amd64
What did you do?
https://go.dev/play/p/wi_i3Dx8Hpa
package main
func clearMap(m map[string]string) {
for k := range m {
delete(m, k)
}
}
//go:noinline
func clearMap2(m map[string]string) {
for k := range m {
delete(m, k)
}
}
var m map[string]string
func main() {
clearMap(m)
clearMap2(m)
}
In go1.18, the compiler will inline clearMap by default, then generates:
CALL runtime.mapiterinit(SB)
JMP 0x45b3c9
MOVQ 0(DX), CX
MOVQ 0x8(DX), DI
LEAQ type.*+23744(SB), AX
MOVQ 0x20(SP), BX
CALL runtime.mapdelete_faststr(SB)
LEAQ 0x28(SP), AX
CALL runtime.mapiternext(SB)
MOVQ 0x28(SP), DX
TESTQ DX, DX
JNE 0x45b3a7
and clearMap2 will call runtime.mapclear.
Is this expected behavior?