summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.go b/main.go
index b734780..f656acc 100644
--- a/main.go
+++ b/main.go
@@ -5,8 +5,14 @@ import (
"os"
)
+type Len string
+
+func (l Len) String() string {
+ return fmt.Sprintf("%3d %s", len(l), string(l))
+}
+
func main() {
for _, a := range os.Args[1:] {
- fmt.Printf("%3d %v\n", len(a), a)
+ fmt.Println(Len(a))
}
}