code: func RequestIDWithHeaderAndLengthLimit(requestIDHeader string, lengthLimit int) goa.Middleware {
  	return func(h goa.Handler) goa.Handler {
  		return func(ctx context.Context, rw http.ResponseWriter, req *http.Request) error {
  			id := req.Header.Get(requestIDHeader)
  			if id == "" {
  				id = fmt.Sprintf("%s-%d", reqPrefix, atomic.AddInt64(&reqID, 1))
  			} else if lengthLimit >= 0 && len(id) > lengthLimit {
  				id = id[:lengthLimit]
  			}
  			ctx = context.WithValue(ctx, reqIDKey, id)
  
  			return h(ctx, rw, req)
  		}
  	}
  }
docs: // RequestIDWithHeaderAndLengthLimit behaves like the middleware RequestID, but it takes the
  // request id header as the (first) argument and a length limit for truncation of the request
  // header value if it exceeds a reasonable length. The limit can be negative for unlimited.