Refactor publish/expose filter to remove duplication
Refactor publish/expose filter to remove duplication

Signed-off-by: Vincent Demeester <87e1f221a672a14a323e57bb65eaea19d3ed3804@sbr.pm>

dgageot/docker,coreos/docker,qudongfang/docker,dims/docker,paralin/docker,noironetworks/docker,bonczj/moby-json-file-logger,gjaskiewicz/moby,jimjag/docker,charleszheng44/moby,trebonian/docker,liaoqingwei/docker,danyalKhaliq10p/moby,dccurtis/docker,konstruktoid/docker-upstream,ripcurld0/moby,shishir-a412ed/docker,unclejack/docker,thtanaka/docker,moul/docker,hqhq/moby,ripcurld0/moby,danyalKhaliq10p/moby,unclejack/docker,dgageot/docker,ndeloof/docker,JMesser81/docker,alfred-landrum/docker,dmcgowan/docker,laijs/moby,sterchelen/docker,Mokolea/docker,mike1729/docker,mkumatag/docker,miminar/docker,erikstmartin/docker,moby/moby,mtesselH/docker,yongtang/docker,tmp6154/docker,YuPengZTE/docker,konstruktoid/docker-1,rhatdan/docker,coolljt0725/docker,kolyshkin/docker,ColinHebert/docker,rancher/docker,michael-holzheu/docker,srust/docker,yosifkit/docker,tophj-ibm/docker,nalind/docker,kojiromike/docker,thaJeztah/docker,shishir-a412ed/docker,Syntaxide/docker,rremer/moby,HideoYamauchi/docker,gnailuy/docker,amatsus/docker,ibuildthecloud/docker,mstanleyjones/docker,AkihiroSuda/docker,maxamillion/docker,pradipd/moby,prertik/docker,coolljt0725/docker,mike1729/docker,KingEmet/docker,maxamillion/docker,scotttlin/docker,pramodhkp/moby,justincormack/docker,mkumatag/docker,ibuildthecloud/docker,imkin/moby,HideoYamauchi/docker,tklauser/docker,raja-sami-10p/moby,jwhonce/docker,Ramzec/docker,mahak/docker,allencloud/docker,paralin/docker,cpuguy83/docker,paralin/docker,danyalKhaliq10p/moby,PatrickLang/moby,rancher/docker,Syntaxide/docker,ColinHebert/docker,rhatdan/docker,jimjag/docker,kolyshkin/moby,yummypeng/docker,sarnautov/moby,gnailuy/docker,laijs/docker,sdurrheimer/docker,YuPengZTE/docker,shhsu/docker,diogomonica/docker,Mokolea/docker,akira-baruah/docker,lixiaobing10051267/docker,erikh/docker,madhanrm/docker,konstruktoid/docker-1,srust/docker,nalind/docker,moul/docker,mtesselH/docker,yongtang/docker,madhanrm/docker,Syntaxide/docker,jvanz/docker,moypray/docker,ibuildthecloud/docker,cyphar/docker,ffoysal/docker,johnstep/moby-moby,moby/moby,cpuguy83/docker,Mokolea/docker,charleszheng44/moby,nalind/docker,kolyshkin/moby,liaoqingwei/docker,yosifkit/docker,konstruktoid/docker-upstream,nawawi/docker,whuwxl/docker,estesp/docker,yosifkit/docker,sarnautov/moby,pradipd/moby,jameszhan/docker,dccurtis/docker,fcrisciani/docker,liaoqingwei/docker,naveed-jamil-tenpearls/moby,tmp6154/docker,allencloud/docker,AkihiroSuda/docker,tklauser/docker,noironetworks/docker,prertik/docker,rhatdan/docker,dgageot/docker,laijs/moby,whuwxl/docker,madhanrm/docker,x1022as/docker,moypray/docker,cyphar/docker,SvenDowideit/docker,mike1729/docker,scotttlin/docker,lixiaobing10051267/docker,crosbymichael/docker,flavio/docker,mixja/docker,rremer/moby,srust/docker,docker/docker,Ramzec/docker,konstruktoid/docker-upstream,naveed-jamil-tenpearls/moby,gnailuy/docker,x1022as/docker,lixiaobing1/docker,thtanaka/docker,laijs/moby,thaJeztah/docker,pradipd/moby,michael-holzheu/docker,coreos/docker,charleszheng44/moby,fcrisciani/docker,JMesser81/docker,tmp6154/docker,yasiramin10p/moby,yummypeng/docker,resin-io/docker,cpuguy83/docker,kolyshkin/docker,nalind/docker,ffoysal/docker,jlhawn/docker,unclejack/docker,kojiromike/docker,shishir-a412ed/docker,YuPengZTE/docker,justincormack/docker,raja-sami-10p/moby,Mokolea/docker,kencochrane/docker,cyphar/docker,mahak/docker,johnstep/moby-moby,djs55/docker,yummypeng/docker,yasiramin10p/moby,bearstech/moby,mixja/docker,AkihiroSuda/docker,gjaskiewicz/moby,pramodhkp/moby,tonistiigi/docker,miminar/docker,noironetworks/docker,amatsus/docker,KingEmet/docker,justincormack/docker,catinthesky/docker,trebonian/docker,johnstep/moby-moby,qudongfang/docker,dmcgowan/docker,gschaetz/moby,yosifkit/docker,erikstmartin/docker,jimjag/docker,jthelin/docker,flavio/docker,kencochrane/docker,mahak/docker,mikebrow/docker,kojiromike/docker,HideoYamauchi/docker,docker/docker,sdurrheimer/docker,gschaetz/moby,trebonian/docker,dperny/docker,mkumatag/docker,ibuildthecloud/docker,mixja/docker,flavio/docker,tophj-ibm/docker,ibuildthecloud/docker,allencloud/docker,jameszhan/docker,lixiaobing1/docker,Ramzec/docker,jwhonce/docker,moby/moby,q384566678/docker,vdemeester/docker,mstanleyjones/docker,bearstech/moby,darrenstahlmsft/moby,haveatry/docker,nawawi/docker,alfred-landrum/docker,jvanz/docker,SvenDowideit/docker,hqhq/moby,duglin/docker,darrenstahlmsft/docker,jwhonce/docker,darrenstahlmsft/moby,dsheets/moby,jlhawn/docker,sterchelen/docker,tianon/docker,nawawi/docker,mikebrow/docker,bearstech/moby,darrenstahlmsft/docker,rancher/docker,KingEmet/docker,catinthesky/docker,erikh/docker,JMesser81/docker,trebonian/docker,thtanaka/docker,dsheets/moby,moypray/docker,djs55/docker,nawawi/docker,diogomonica/docker,shhsu/docker,jlhawn/docker,mikebrow/docker,ndeloof/docker,mahak/docker,fcrisciani/docker,dims/docker,alfred-landrum/docker,yasiramin10p/moby,dmcgowan/docker,maxamillion/docker,ndeloof/docker,laijs/docker,crosbymichael/docker,sarnautov/moby,tophj-ibm/moby,dccurtis/docker,konstruktoid/docker-upstream,jvanz/docker,haveatry/docker,kolyshkin/moby,jameszhan/docker,laijs/docker,KarthikNayak/docker,catinthesky/docker,mstanleyjones/docker,PatrickLang/moby,miminar/docker,erikh/docker,mtesselH/docker,estesp/docker,KarthikNayak/docker,Ramzec/docker,gnailuy/docker,bearstech/moby,darrenstahlmsft/moby,tonistiigi/docker,haveatry/docker,moul/docker,dperny/docker,duglin/docker,coolljt0725/docker,amatsus/docker,rremer/moby,ColinHebert/docker,crosbymichael/docker,thaJeztah/docker,gschaetz/moby,x1022as/docker,POLJM242/docker,darrenstahlmsft/docker,bonczj/moby-json-file-logger,KarthikNayak/docker,tonistiigi/docker,duglin/docker,jthelin/docker,POLJM242/docker,lixiaobing10051267/docker,docker/docker,hqhq/moby,dims/docker,q384566678/docker,pramodhkp/moby,akira-baruah/docker,vdemeester/docker,sterchelen/docker,tophj-ibm/docker,whuwxl/docker,moby/moby,shhsu/docker,gjaskiewicz/moby,prertik/docker,yongtang/docker,jimjag/docker,diogomonica/docker,thaJeztah/docker,qudongfang/docker,naveed-jamil-tenpearls/moby,bonczj/moby-json-file-logger,raja-sami-10p/moby,estesp/docker,vdemeester/docker,coreos/docker,resin-io/docker,cpuguy83/docker,dperny/docker,imkin/moby,flavio/docker,tklauser/docker,tophj-ibm/moby,SvenDowideit/docker,resin-io/docker,imkin/moby,AkihiroSuda/docker,ffoysal/docker,konstruktoid/docker-1,tianon/docker,PatrickLang/moby,dsheets/moby,djs55/docker,q384566678/docker,michael-holzheu/docker,lixiaobing1/docker,scotttlin/docker,sdurrheimer/docker,ripcurld0/moby,tophj-ibm/moby,kencochrane/docker,paralin/docker,moul/docker,erikstmartin/docker