write-rule.go

version 1 : buggy