blob: aea167026f001e634f96059426787d2d165622c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import re
route_path = '/home/kboz/eve_haul/backend-go/internal/core/route.go'
with open(route_path, 'r') as f:
text = f.read()
text = re.sub(r'type Ship struct \{[^\}]+\}', '''type Ship struct {
TaxRate float64 `json:"tax_rate"`
ProfitThreshold float64 `json:"profit_threshold"`
MaxCapital float64 `json:"max_capital"`
SnipeThreshold float64 `json:"snipe_profit_threshold"`
Location int `json:"location"`
Cargo float64 `json:"cargo"`
MaxWarpSpeed float64 `json:"max_warp_speed"`
MaxSubwarpSpeed float64 `json:"max_subwarp_speed"`
GankersAreas map[string]float64 `json:"gankers_areas"`
PlayerCost float64 `json:"player_cost"`
RiskCost float64 `json:"risk_cost"`
ShipCost float64 `json:"ship_cost"`
}''', text)
with open(route_path, 'w') as f:
f.write(text)
|