I tried for ages to find a pattern for a knitted peg bag so in the end I gave up and made my own!
Here is the front;

Here is the back, showing the alternate way of attaching it to a coathanger, you can also attach it directly to your line!
Materials;Chunky yarn, I used about 180g for this large bag
8mm needles
Tapestry needle
Coathanger
PatternCO 24 sts.
Work in seed stitch/moss stitch
Row 1: *K1,P1* repeat til end of row
Row 2: *P1,K1* repeat til end of row
Continue until you have reached desired size. I stopped at about 25 inches.
Work 6 sts, cast off 12 sts, work 6 sts.
Work 6 sts, put other 6 sts on a stitch holder.
Work 20 rows.
Make buttonhole on 21st row; K2, yfwd, K2tog, K2
Knit 4 rows garter stitch.
Cast off these 6 sts.
Return to sts on stitch holder and work 20 rows etc. (same as other side)
Making upSew on 2 large buttons and sew up seams, making sure you begin a little below the opening. Weave loose ends in.
This is a big peg bag because I have a large washing line and 80 pegs to put in it!
P.S. Just as I finished my peg bag it started raining! Typical!