package main

import "fmt"

type www interface {
	Write()
}
type ByteCounter int

func (c *ByteCounter) Write(p []byte) (int, error) {
	*c += ByteCounter(len(p))
	return len(p), nil
}

func main() {
	var c ByteCounter
	c.Write([]byte("hello"))
	fmt.Println(c)
	name := "dugulp"
	fmt.Fprintf(&c, "Hello, %s", name)
	fmt.Println(c)
}
