code: func NewStackEventWatcher(session client.ConfigProvider, stackName string) (*StackEventWatcher, error) {
  	sw := StackEventWatcher{
  		Service:    cloudformation.New(session),
  		StackName:  stackName,
  		seenEvents: map[string]struct{}{},
  	}
  
  	err := sw.Service.DescribeStackEventsPages(&cloudformation.DescribeStackEventsInput{
  		StackName: aws.String(sw.StackName),
  	}, func(p *cloudformation.DescribeStackEventsOutput, _ bool) bool {
  		for _, stackEvent := range p.StackEvents {
  			sw.seenEvents[*stackEvent.EventId] = struct{}{}
  		}
  		return true
  	})
  	if err != nil {
  		return nil, err
  	}
  	return &sw, nil
  }
docs: // NewStackEventWatcher returns a new StackEventWatcher that emits events for the
  // specified stack. It scans all the existing events and adds them to seenEvents
  // so that events the occur prior to the invocation of this function will not be
  // printed.