Change the way imported binary variables are imported, from `reflect.ValueOf(val)` to `reflect.ValueOf(&val).Elem()`, to allow these variables to be set from the interpreter. Regenerate stdlib packages accordingly. Ensure that binary value is forwarded if it exists. Add tests.
13 lines
320 B
Go
13 lines
320 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
http.DefaultServeMux.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {})
|
|
http.DefaultServeMux = &http.ServeMux{}
|
|
http.DefaultServeMux.HandleFunc("/hello", func(w http.ResponseWriter, r *http.Request) {})
|
|
http.DefaultServeMux = &http.ServeMux{}
|
|
}
|