summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-09-30 13:11:33 -0700
committerRob Pike <r@golang.org>2009-09-30 13:11:33 -0700
commitcea1e9d746c5013b6566fac3a06f817626fbcae1 (patch)
tree3cf48014a854d9ceee474a3c4628bcb714dbf8c9 /src
parent11f8e08cd3bf0ffd20e50380014cf210f028da03 (diff)
downloadgolang-cea1e9d746c5013b6566fac3a06f817626fbcae1.tar.gz
rename the public exvar package to be expvar.
R=rsc DELTA=684 (324 added, 324 deleted, 36 changed) OCL=35161 CL=35163
Diffstat (limited to 'src')
-rw-r--r--src/pkg/Make.deps2
-rw-r--r--src/pkg/Makefile2
-rw-r--r--src/pkg/expvar/Makefile (renamed from src/pkg/exvar/Makefile)4
-rw-r--r--src/pkg/expvar/expvar.go (renamed from src/pkg/exvar/exvar.go)8
-rw-r--r--src/pkg/expvar/expvar_test.go (renamed from src/pkg/exvar/exvar_test.go)2
-rw-r--r--src/pkg/http/triv.go10
6 files changed, 14 insertions, 14 deletions
diff --git a/src/pkg/Make.deps b/src/pkg/Make.deps
index 33631e668..1f85b2c39 100644
--- a/src/pkg/Make.deps
+++ b/src/pkg/Make.deps
@@ -26,7 +26,7 @@ debug/gosym.install: debug/binary.install fmt.install os.install strconv.install
debug/proc.install: container/vector.install fmt.install io.install os.install runtime.install strconv.install strings.install sync.install syscall.install
ebnf.install: container/vector.install go/scanner.install go/token.install os.install strconv.install unicode.install utf8.install
exec.install: os.install strings.install
-exvar.install: bytes.install fmt.install http.install log.install strconv.install sync.install
+expvar.install: bytes.install fmt.install http.install log.install strconv.install sync.install
flag.install: fmt.install os.install strconv.install
fmt.install: io.install os.install reflect.install strconv.install utf8.install
go/ast.install: go/token.install unicode.install utf8.install
diff --git a/src/pkg/Makefile b/src/pkg/Makefile
index ad2b7828d..6dd11f93e 100644
--- a/src/pkg/Makefile
+++ b/src/pkg/Makefile
@@ -40,7 +40,7 @@ DIRS=\
debug/proc\
ebnf\
exec\
- exvar\
+ expvar\
flag\
fmt\
go/ast\
diff --git a/src/pkg/exvar/Makefile b/src/pkg/expvar/Makefile
index 795e8a644..49e8de6d1 100644
--- a/src/pkg/exvar/Makefile
+++ b/src/pkg/expvar/Makefile
@@ -4,8 +4,8 @@
include $(GOROOT)/src/Make.$(GOARCH)
-TARG=exvar
+TARG=expvar
GOFILES=\
- exvar.go\
+ expvar.go\
include $(GOROOT)/src/Make.pkg
diff --git a/src/pkg/exvar/exvar.go b/src/pkg/expvar/expvar.go
index 479154850..9d04a427c 100644
--- a/src/pkg/exvar/exvar.go
+++ b/src/pkg/expvar/expvar.go
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// The exvar package provides a standardized interface to public variables,
+// The expvar package provides a standardized interface to public variables,
// such as operation counters in servers. It exposes these variables via
// HTTP at /debug/vars in JSON format.
-package exvar
+package expvar
import (
"bytes";
@@ -203,7 +203,7 @@ func Iter() <-chan KeyValue {
return c
}
-func exvarHandler(c *http.Conn, req *http.Request) {
+func expvarHandler(c *http.Conn, req *http.Request) {
c.SetHeader("content-type", "application/json; charset=utf-8");
fmt.Fprintf(c, "{\n");
first := true;
@@ -218,5 +218,5 @@ func exvarHandler(c *http.Conn, req *http.Request) {
}
func init() {
- http.Handle("/debug/vars", http.HandlerFunc(exvarHandler));
+ http.Handle("/debug/vars", http.HandlerFunc(expvarHandler));
}
diff --git a/src/pkg/exvar/exvar_test.go b/src/pkg/expvar/expvar_test.go
index eddbbf9e2..1f3e3d686 100644
--- a/src/pkg/exvar/exvar_test.go
+++ b/src/pkg/expvar/expvar_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package exvar
+package expvar
import (
"json";
diff --git a/src/pkg/http/triv.go b/src/pkg/http/triv.go
index 900dcbb5b..0c74aed12 100644
--- a/src/pkg/http/triv.go
+++ b/src/pkg/http/triv.go
@@ -7,7 +7,7 @@ package main
import (
"bytes";
"bufio";
- "exvar";
+ "expvar";
"flag";
"fmt";
"io";
@@ -19,7 +19,7 @@ import (
// hello world, the web server
-var helloRequests = exvar.NewInt("hello-requests");
+var helloRequests = expvar.NewInt("hello-requests");
func HelloServer(c *http.Conn, req *http.Request) {
helloRequests.Add(1);
io.WriteString(c, "hello, world!\n");
@@ -30,7 +30,7 @@ type Counter struct {
n int;
}
-// This makes Counter satisfy the exvar.Var interface, so we can export
+// This makes Counter satisfy the expvar.Var interface, so we can export
// it directly.
func (ctr *Counter) String() string {
return fmt.Sprintf("%d", ctr.n)
@@ -56,7 +56,7 @@ func (ctr *Counter) ServeHTTP(c *http.Conn, req *http.Request) {
// simple file server
var webroot = flag.String("root", "/home/rsc", "web root directory")
-var pathVar = exvar.NewMap("file-requests");
+var pathVar = expvar.NewMap("file-requests");
func FileServer(c *http.Conn, req *http.Request) {
c.SetHeader("content-type", "text/plain; charset=utf-8");
pathVar.Add(req.Url.Path, 1);
@@ -143,7 +143,7 @@ func main() {
// The counter is published as a variable directly.
ctr := new(Counter);
http.Handle("/counter", ctr);
- exvar.Publish("counter", ctr);
+ expvar.Publish("counter", ctr);
http.Handle("/go/", http.HandlerFunc(FileServer));
http.Handle("/flags", http.HandlerFunc(FlagServer));