File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed 
tools/spectral/ipa/metrics/utils Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,14 @@ import (
99// PathTagMapping represents a map from paths to tags. 
1010type  PathTagMapping  map [string ]string 
1111
12+ var  mapping  PathTagMapping 
13+ 
1214func  loadMappingFromFile (fileName  string ) (PathTagMapping , error ) {
1315	data , err  :=  os .ReadFile (fileName )
1416	if  err  !=  nil  {
1517		return  nil , fmt .Errorf ("failed to read mapping file: %v" , err )
1618	}
1719
18- 	var  mapping  PathTagMapping 
1920	if  err  :=  json .Unmarshal (data , & mapping ); err  !=  nil  {
2021		return  nil , fmt .Errorf ("failed to parse mapping file: %v" , err )
2122	}
@@ -37,8 +38,6 @@ func writeMappingToFile(fileName string) error {
3738	return  nil 
3839}
3940
40- var  mapping  PathTagMapping 
41- 
4241func  savePathMapTagging (path  string , tag  string ) {
4342	if  mapping  ==  nil  {
4443		mapping  =  make (map [string ]string )
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments