code: func newCommandSub(args []string, cli *client.Client) (command, error) {
  	// Create a flag set.
  	var flg flag.FlagSet
  
  	// Define the flags.
  	topicFilter := flg.String("t", "", "Topic Filter")
  	qos := flg.Uint("q", uint(mqtt.QoS0), "QoS")
  
  	// Parse the flag.
  	if err := flg.Parse(args); err != nil {
  		return nil, errCmdArgsParse
  	}
  
  	// Create a sub command.
  	cmd := &commandSub{
  		cli: cli,
  		subscribeOpts: &client.SubscribeOptions{
  			SubReqs: []*client.SubReq{
  				&client.SubReq{
  					TopicFilter: []byte(*topicFilter),
  					QoS:         byte(*qos),
  					Handler:     messageHandler,
  				},
  			},
  		},
  	}
  
  	// Return the command.
  	return cmd, nil
  }
docs: // newCommandSub creates and returns a sub command.