aboutsummaryrefslogtreecommitdiff
path: root/units.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-11 20:12:25 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-11 20:12:25 +0200
commitcd2e10f103c1d78876f28e1b77582dcf46f50042 (patch)
tree85d0d91cc643c52be872b27c5ed0bdd7c85572c7 /units.go
parent005049731e688de56aa50bfbb1ab68bda947fac0 (diff)
Rename scan* into New*
Diffstat (limited to 'units.go')
-rw-r--r--units.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/units.go b/units.go
index e5fb865..b05ac3b 100644
--- a/units.go
+++ b/units.go
@@ -17,7 +17,7 @@ func (u Unit) String() string {
return fmt.Sprintf("%.2f", u)
}
-func scanUnit(s string) (u Unit) {
+func NewUnit(s string) (u Unit) {
fmt.Sscanf(s, "%v", &u)
return
}
@@ -30,7 +30,7 @@ func (p Point) String() string {
return fmt.Sprintf("%v,%v", p.X, p.Y)
}
-func scanPoint(s string) (p Point) {
+func NewPoint(s string) (p Point) {
fmt.Sscanf(s, "%v,%v", &p.X, &p.Y)
return
}
@@ -43,7 +43,7 @@ func (t Triple) String() string {
return fmt.Sprintf("%v,%v,%v", t.U, t.V, t.W)
}
-func scanTriple(s string) (t Triple) {
+func NewTriple(s string) (t Triple) {
fmt.Sscanf(s, "%v,%v,%v", &t.U, &t.V, &t.W)
return
}