code: func ServiceWithNetwork(network string) ServiceSpecOpt {
  	return func(spec *swarmtypes.ServiceSpec) {
  		spec.TaskTemplate.Networks = append(spec.TaskTemplate.Networks,
  			swarmtypes.NetworkAttachmentConfig{Target: network})
  	}
  }
docs: // ServiceWithNetwork sets the network of the service