diff --git a/config.go b/config.go index f6caa94..31f9bbe 100644 --- a/config.go +++ b/config.go @@ -11,12 +11,31 @@ import ( const DefaultJailBaseURL = "https://omsweb.public-safety-cloud.com" type JailConfig struct { - // How we describe the jail - PrettyName string + // Used in API URLs; the jail's unique identifier in JailTracker + Slug string + // Whether or not we can currently pull data from the jail. + // Jail might require search, consistently times out or errors, etc + Usable bool + + /* Optional fields */ + + // The Title field is currently ignored. This should gradually be broken out to Facility and State. + // It's a relic of the initial data scrape for list of jails. + + // Name and state of facility + Facility string + State string // URL for the jail. Usually "https://omsweb.public-safety-cloud.com", but not always! BaseURL string - // Used in API URLs - Slug string + // The main public website of the facility itself + FacilityURL string + // JailTracker web page for viewing the roster. Helpful for including in logs for convenient debugging. + IndexURL string + // Some jails allow advance search; JTT isn't using this right now, but it's helpful to know. + // For example, searching by release status + HasAdvancedSearch bool + // Notes on the entry; e.g. why it isn't usable + Notes string } type AppConfig struct { diff --git a/config.json b/config.json index 1771380..3031dda 100644 --- a/config.json +++ b/config.json @@ -1,33 +1,1205 @@ { + "Cache": "./cache", "Jails": [ { - "Name": "DeSoto County", - "Slug": "DeSoto_County_Ms" + "Title": "Marion County MS", + "Facility": "Marion County Jail", + "State": "MS", + "Slug": "Marion_County_Ms", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Marion_County_Ms", + "FacilityURL": "", + "Notes": "Manual addition, not from Google", + "BaseURL": "https://omsweb.public-safety-cloud.com" }, { - "Name": "Forrest County", - "Slug": "Forrest_County_MS" + "Title": "Perry County MS", + "Facility": "Perry County Jail", + "State": "MS", + "Slug": "Perry_County_Ms", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Perry_County_Ms", + "FacilityURL": "", + "Notes": "Manual addition, not from Google", + "BaseURL": "https://omsweb.public-safety-cloud.com" }, { - "Name": "Hancock County", - "Slug": "HANCOCK_COUNTY_MS" + "Title": "Oklahoma County OK", + "Facility": "Oklahoma County Jail", + "State": "OK", + "Slug": "Oklahoma_County_OK", + "Usable": false, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Oklahoma_County_OK", + "FacilityURL": "", + "Notes": "Requires search", + "BaseURL": "https://omsweb.public-safety-cloud.com" }, { - "Name": "Lamar County", - "Slug": "Lamar_County_Ms" + "Title": "Desoto County Jail, MS", + "Facility": "DeSoto County Jail", + "State": "MS", + "Slug": "DeSoto_County_Ms", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/DeSoto_County_Ms", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" }, { - "Name": "Marion County", - "Slug": "Marion_County_Ms" + "Title": "RSW Regional Jail VA", + "Facility": "RSW Regional Jail", + "State": "VA", + "Slug": "RSW_Regional_VA", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/RSW_Regional_VA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" }, { - "Name": "Perry County", - "Slug": "Perry_County_MS" + "Title": "St Joseph County IN", + "Facility": "", + "State": "IN", + "Slug": "StJoseph_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/StJoseph_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" }, { - "Name": "Yazoo County", - "Slug": "Yazoo_County_MS" + "Title": "Greenwood Co SC", + "Facility": "", + "State": "SC", + "Slug": "Greenwood_County_SC", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Greenwood_County_SC", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Isabella Co MI", + "Facility": "", + "State": "MI", + "Slug": "Isabella_County_MI", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Isabella_County_MI", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Vigo County IN", + "Facility": "", + "State": "IN", + "Slug": "Vigo_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Vigo_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Kenton County Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "Kenton_County_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Kenton_County_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Greene County MO", + "Facility": "", + "State": "MO", + "Slug": "Greene_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Greene_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Burleigh County Detention Center, ND", + "Facility": "", + "State": "ND", + "Slug": "Burleigh_County_ND", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Burleigh_County_ND", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Pamunkey JMS, VA", + "Facility": "Pamunkey Regional Jail", + "State": "VA", + "Slug": "Pamunkey_JMS_VA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Pamunkey_JMS_VA", + "FacilityURL": "https://www.hanovercounty.gov/232/Pamunkey-Regional-Jail", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Grant County Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "Grant_County_Ky", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Grant_County_Ky", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Ohio County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "OHIO_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/OHIO_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Logan County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "LOGAN_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/LOGAN_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Leslie County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "LESLIE_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/LESLIE_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Oldham County Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "Oldham_County_Ky", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Oldham_County_Ky", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Knox County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "KNOX_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/KNOX_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Henderson Co. Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "HENDERSON_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/HENDERSON_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Clark Co Det Center, KY", + "Facility": "", + "State": "KY", + "Slug": "Clark_County_Ky", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Clark_County_Ky", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Daviess County Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "DAVIES_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/DAVIES_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Scott County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "Scott_County_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Scott_County_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Virginia Peninsula Regional Jail VA", + "Facility": "", + "State": "VA", + "Slug": "Virginia_PenRJ_VA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Virginia_PenRJ_VA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Warren County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "Warren_County_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Warren_County_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Pulaski County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "PULASKI_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/PULASKI_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Campbell County Jail KY", + "Facility": "", + "State": "KY", + "Slug": "Campbell_County_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Campbell_County_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Rowan County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "Rowan_County_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Rowan_County_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Boone County IN", + "Facility": "", + "State": "IN", + "Slug": "Boone_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Boone_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Tippecanoe Co IN", + "Facility": "", + "State": "IN", + "Slug": "Tippecanoe_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Tippecanoe_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Laporte County Jail, IN", + "Facility": "", + "State": "IN", + "Slug": "Laporte_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Laporte_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Grant County NM", + "Facility": "", + "State": "NM", + "Slug": "Grant_County_NM", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Grant_County_NM", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Western Tidewater VA", + "Facility": "", + "State": "VA", + "Slug": "Western_Tidewater_VA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Western_Tidewater_VA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Starke County IN", + "Facility": "", + "State": "IN", + "Slug": "Starke_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Starke_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Chester Co Detention Center, SC", + "Facility": "", + "State": "SC", + "Slug": "Chester_County_SC", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Chester_County_SC", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Greene County PA", + "Facility": "", + "State": "PA", + "Slug": "Greene_County_PA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Greene_County_PA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Saginaw Co MI", + "Facility": "", + "State": "MI", + "Slug": "Saginaw_County_MI", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Saginaw_County_MI", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Hancock County IN", + "Facility": "", + "State": "IN", + "Slug": "Hancock_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Hancock_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Socorro County NM", + "Facility": "", + "State": "NM", + "Slug": "Socorro_County_NM", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Socorro_County_NM", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Southwest VA", + "Facility": "", + "State": "VA", + "Slug": "Southwest_VA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Southwest_VA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Ottawa County OH", + "Facility": "", + "State": "OH", + "Slug": "Ottawa_County_OH", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Ottawa_County_OH", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Pickens County GA", + "Facility": "", + "State": "GA", + "Slug": "Pickens_County_GA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Pickens_County_GA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Marion County MS", + "Facility": "", + "State": "MS", + "Slug": "MARION_COUNTY_MS", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/MARION_COUNTY_MS", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Alpena Co MI", + "Facility": "", + "State": "MI", + "Slug": "Alpena_County_MI", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Alpena_County_MI", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Hendricks County IN", + "Facility": "", + "State": "IN", + "Slug": "Hendricks_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Hendricks_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Lamar Co Correct Facility, MS", + "Facility": "", + "State": "MS", + "Slug": "Lamar_County_MS", + "Usable": false, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Lamar_County_MS", + "FacilityURL": "", + "Notes": "Busted 2024-07-16. Error 789456123: Data Store Unreachable. Also note that Lamar_County_Ms goes to the same location.", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Hillsdale MI", + "Facility": "", + "State": "MI", + "Slug": "Hillsdale_MI", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Hillsdale_MI", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Lincoln County MO", + "Facility": "", + "State": "MO", + "Slug": "Lincoln_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Lincoln_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Harrison County Jail, MS", + "Facility": "", + "State": "MS", + "Slug": "HARRISON_COUNTY_JAIL_MS", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/HARRISON_COUNTY_JAIL_MS", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Blue Ridge Regional Jail Lynchburg, VA", + "Facility": "Blue Ridge Regional Jail (Lynchburg)", + "State": "VA", + "Slug": "Blue_Ridge_Regional_VA_Lynchburg", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Blue_Ridge_Regional_VA_Lynchburg", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Dawson Co Detention Center, GA", + "Facility": "", + "State": "GA", + "Slug": "Dawson_County_GA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Dawson_County_GA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Marion County KY", + "Facility": "", + "State": "KY", + "Slug": "Marion_County_KY", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Marion_County_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Vermont DOC", + "Facility": "", + "State": "VT", + "Slug": "Vermont", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Vermont", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Levy County FL", + "Facility": "", + "State": "FL", + "Slug": "LEVY_COUNTY_FL", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/LEVY_COUNTY_FL", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Scott County MO", + "Facility": "", + "State": "MO", + "Slug": "Scott_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Scott_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "McPherson County KS", + "Facility": "", + "State": "KS", + "Slug": "McPherson_County_KS", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/McPherson_County_KS", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Midland County Sheriffs Office, MI", + "Facility": "", + "State": "MI", + "Slug": "Midland_County_MI", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Midland_County_MI", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Archuleta Co CO", + "Facility": "", + "State": "CO", + "Slug": "Archuleta_County_CO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Archuleta_County_CO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Sullivan County IN", + "Facility": "", + "State": "IN", + "Slug": "Sullivan_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Sullivan_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Gratiot Co MI", + "Facility": "", + "State": "MI", + "Slug": "Gratiot_County_MI", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Gratiot_County_MI", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Clay County IN", + "Facility": "", + "State": "IN", + "Slug": "Clay_County_IN", + "Usable": false, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Clay_County_IN", + "FacilityURL": "", + "Notes": "2024-07-10: Error 789456123: Data Store Unreachable", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Knox County Jail, IN", + "Facility": "", + "State": "IN", + "Slug": "Knox_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Knox_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Kleberg County TX", + "Facility": "", + "State": "TX", + "Slug": "Kleberg_County_Tx", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Kleberg_County_Tx", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Washington County Jail, IN", + "Facility": "", + "State": "IN", + "Slug": "Washington_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Washington_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Middle River Regional Jail VA", + "Facility": "", + "State": "VA", + "Slug": "Middle_River_Regional_Jail_VA", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Middle_River_Regional_Jail_VA", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Marshall County Sheriff Office, TN", + "Facility": "", + "State": "TN", + "Slug": "MARSHALL_COUNTY_TN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/MARSHALL_COUNTY_TN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Platte County Sheriff, MO", + "Facility": "", + "State": "MO", + "Slug": "Platte_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Platte_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Pulaski County Jail, IN", + "Facility": "", + "State": "IN", + "Slug": "Pulaski_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Pulaski_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Dupage Co Sheriff", + "Facility": "", + "State": "IL", + "Slug": "Dupage_County_IL", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Dupage_County_IL", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Dorchester County MD", + "Facility": "", + "State": "MD", + "Slug": "Dorchester_County_MD", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Dorchester_County_MD", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Laurel County Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "Laurel_County_Ky", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Laurel_County_Ky", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Shelby County Jail, IN", + "Facility": "", + "State": "IN", + "Slug": "Shelby_County_IN", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Shelby_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Howard County IN", + "Facility": "", + "State": "IN", + "Slug": "howard_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/howard_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Tipton County IN", + "Facility": "", + "State": "IN", + "Slug": "Tipton_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Tipton_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Daviess Dekalb MO", + "Facility": "", + "State": "MO", + "Slug": "Daviess_DeKalb_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Daviess_DeKalb_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Putnam Co Sheriffs Dept, IN", + "Facility": "", + "State": "IN", + "Slug": "Putnam_County_In", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Putnam_County_In", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Christian County MO", + "Facility": "", + "State": "MO", + "Slug": "Christian_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Christian_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Lincoln County MO", + "Facility": "", + "State": "MO", + "Slug": "Lincoln_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Lincoln_County_MO", + "FacilityURL": "", + "Notes": "Had to search for correct URL", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Hancock Co Sheriff, MS", + "Facility": "", + "State": "MS", + "Slug": "HANCOCK_COUNTY_MS", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/HANCOCK_COUNTY_MS", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Whitley Co Sheriffs Dept, IN", + "Facility": "Whitley County SD", + "State": "IN", + "Slug": "Whitley_County_In", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Whitley_County_In", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Fulton County Jail, KY", + "Facility": "Fulton County Jail", + "State": "KY", + "Slug": "FULTON_COUNTY_REGIONAL_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/FULTON_COUNTY_REGIONAL_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Northern Neck Regional Jail VA", + "Facility": "Northern Neck Regional Jail", + "State": "VA", + "Slug": "Northern_Neck_VA", + "Usable": false, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Northern_Neck_VA", + "FacilityURL": "", + "Notes": "Search required", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Harlan County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "HARLAN_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/HARLAN_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Giles County Jail, TN", + "Facility": "", + "State": "TN", + "Slug": "Giles_County_Tn", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Giles_County_Tn", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Yazoo Co RCF, MS", + "Facility": "", + "State": "MS", + "Slug": "Yazoo_County_MS", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Yazoo_County_MS", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Nelson County Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "Nelson_County_Ky", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Nelson_County_Ky", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Greenwood Co SC", + "Facility": "", + "State": "SC", + "Slug": "Greenwood_County_SC", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Greenwood_County_SC", + "FacilityURL": "", + "Notes": "Had to search for correct URL", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Saline County MO", + "Facility": "", + "State": "MO", + "Slug": "Saline_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Saline_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Marion County KS", + "Facility": "", + "State": "KS", + "Slug": "Marion_County_KS", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Marion_County_KS", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Cedar County MO", + "Facility": "", + "State": "MO", + "Slug": "Cedar_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Cedar_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Jessamine Co. Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "Jessamine_County_Ky", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Jessamine_County_Ky", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Henry County MO", + "Facility": "", + "State": "MO", + "Slug": "Henry_County_MO", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Henry_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Bell County Detention Center, KY", + "Facility": "", + "State": "KY", + "Slug": "Bell_County_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Bell_County_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Invalid Facility", + "Facility": "Macomb County", + "State": "MI", + "Slug": "MACOMB_CO_MI", + "Usable": false, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.secure-gps.com/jtclientweb/jailtracker/index/MACOMB_CO_MI", + "FacilityURL": "", + "Notes": "Search required", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "McDonald County MO", + "Facility": "", + "State": "MO", + "Slug": "McDonald_County_MO", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/McDonald_County_MO", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Hopkins Co. Jail, KY", + "Facility": "", + "State": "KY", + "Slug": "HOPKINS_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/HOPKINS_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Allen County Detention Center", + "Facility": "", + "State": "KY", + "Slug": "ALLEN_COUNTY_KY", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/ALLEN_COUNTY_KY", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Perry Co Sheriff IN", + "Facility": "", + "State": "IN", + "Slug": "Perry_County_IN", + "Usable": true, + "HasAdvancedSearch": false, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Perry_County_IN", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Atchison County KS", + "Facility": "", + "State": "KS", + "Slug": "Atchison_County_KS", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Atchison_County_KS", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" + }, + { + "Title": "Blue Ridge Regional Jail Halifax, VA", + "Facility": "Blue Ridge Regional Jail (Halifax)", + "State": "VA", + "Slug": "Blue_Ridge_Regional_VA_Halifax", + "Usable": true, + "HasAdvancedSearch": true, + "IndexURL": "https://omsweb.public-safety-cloud.com/jtclientweb/jailtracker/index/Blue_Ridge_Regional_VA_Halifax", + "FacilityURL": "", + "Notes": "", + "BaseURL": "https://omsweb.public-safety-cloud.com" } - ], - "Cache": "./cache" + ] } diff --git a/inmate.go b/inmate.go index b877a38..8fdec76 100644 --- a/inmate.go +++ b/inmate.go @@ -74,8 +74,11 @@ type InmateResponse struct { CaptchaRequired bool `json:"captchaRequred"` // sic, yes "Requred" OffenderViewKey int `json:"offenderViewKey"` CaptchaKey string `json:"captchaKey"` - ErrorMessage string `json:"errorMessage"` - Success bool `json:"succes"` // sic, yes "succes" + // Here, this is null on success (empty string for JailResponse) and set on error. + // Used in place of HTTP status codes; so far I only see 200s. + // (Requesting a non-existent inmate is actually a 200, succes=true, no error, but captchaRequred=true) + ErrorMessage string `json:"errorMessage"` + Success bool `json:"succes"` // sic, yes "succes" // Related to the actual inmate Cases []Case `json:"cases"` Charges []Charge `json:"charges"` @@ -138,6 +141,9 @@ func (i *Inmate) Update(j *Jail) error { if err != nil { return fmt.Errorf("failed to update inmate: %w", err) } + if inmateResponse.ErrorMessage != "" { + return fmt.Errorf(`non-empty error message for inmate "%s": "%s"`, i.ArrestNo, inmateResponse.ErrorMessage) + } if !inmateResponse.CaptchaRequired { // Success! break } diff --git a/jail.go b/jail.go index b3e6fc0..2b36d1f 100644 --- a/jail.go +++ b/jail.go @@ -9,6 +9,7 @@ import ( type JailResponse struct { // Yes, "Requred", this is in their API. This key (like others) is typo'd. + // (Also typo'd in the inmate request, but NOT in <FACILITY>/NameSearch) CaptchaRequired bool `json:"captchaRequred"` // They'll keep updating this CaptchaKey string `json:"captchaKey"` @@ -16,6 +17,10 @@ type JailResponse struct { Offenders []Inmate `json:"offenders"` // This is updated with every request OffenderViewKey int `json:"offenderViewKey"` + // Empty string on success, non-empty on error. + // JailTracker sitll returns a 200 for what should be an internal server error or bad gateway, + // but this will at least be set. + ErrorMessage string `json:"errorMessage"` } type Jail struct { @@ -53,6 +58,9 @@ func NewJail(baseURL, name string) (*Jail, error) { if err != nil { return nil, fmt.Errorf("failed to request initial jail data: %w", err) } + if jailResponse.ErrorMessage != "" { + return nil, fmt.Errorf(`non-empty error message for jail "%s": "%s"`, name, jailResponse.ErrorMessage) + } if jailResponse.CaptchaRequired { return nil, fmt.Errorf("captcha required for jail. Response: %v", jailResponse) } @@ -120,7 +128,6 @@ func (j Jail) getJailAPIURL() string { } func CrawlJail(baseURL, name string) (*Jail, error) { - log.Printf("Crawling jail: %s", name) j, err := NewJail(baseURL, name) if err != nil { return nil, fmt.Errorf("failed to initialize jail: %w", err) diff --git a/main.go b/main.go index d3616d0..99a0dea 100644 --- a/main.go +++ b/main.go @@ -30,10 +30,15 @@ func main() { log.Fatalf("Failed to validate environment: %v", err) } for _, jailConfig := range appConfig.Jails { + if !jailConfig.Usable { + log.Printf(`Skipped "%s". Not usable.`, jailConfig.Slug) + continue + } // Right now we do nothing here. Later, the cached data can be used to update a remote database. _, err := LoadJailCached(&jailConfig) if err != nil { - panic(err) + log.Printf(`Skipped "%s". Failed to load: %s`, jailConfig.Slug, err) + continue } } } @@ -46,6 +51,7 @@ func LoadJailCached(jailConfig *JailConfig) (*Jail, error) { file, err := os.OpenFile(filename, os.O_RDWR|os.O_EXCL, 0644) if errors.Is(err, os.ErrNotExist) { // File doesn't exist; create it log.Printf("Cache miss for \"%s\"", filename) + log.Printf(`Crawling jail "%s". See %s`, jailConfig.Slug, jailConfig.IndexURL) jail, err := CrawlJail(jailConfig.BaseURL, jailConfig.Slug) if err != nil { return nil, err