Вот, как заставить работатьтакой код (Playground)? СлайсIpRangesвнутри структуры не увеличивается, хоть ты тресни... с какимcapacityего ни создавай. Добавляется один элемент и всё. Может всю структуру пересоздавать каждый раз?
## Код:
```
package main

import (
   "fmt"
)

type (
   IP2LocRec struct {
      IpLo, IpHi   string
      CCode, CName string
   }

   IpDbRange struct {
      IpLo, IpHi string
   }
   IpDbRanges  []IpDbRange
   IpDbCountry struct {
      IpRanges IpDbRanges
      CName    string
   }
   IpDbCountries map[string]IpDbCountry
)

func process_line(row IP2LocRec) {
   var (
      cInfo IpDbCountry
      ok    bool
   )
   if cInfo, ok = countries[row.CCode]; !ok {
      fmt.Printf("Adding country\n")
      countries[row.CCode] = IpDbCountry{CName: row.CName, IpRanges: make([]IpDbRange, 1, 1)}
      cInfo, ok = countries[row.CCode]
      cInfo.IpRanges[len(cInfo.IpRanges)-1] = IpDbRange{IpLo:row.IpLo, IpHi:row.IpHi}
   } else {
      var newRanges IpDbRanges
      lenRanges := len(cInfo.IpRanges)
      capRanges := cap(cInfo.IpRanges)
      fmt.Printf("cInfo.IpRanges before changes: len: %v, cap: %v -> ", len(cInfo.IpRanges), cap(cInfo.IpRanges))
      if lenRanges == capRanges {
         newRanges = make([]IpDbRange, lenRanges+1, lenRanges*2)
         copy(newRanges, cInfo.IpRanges)
         cInfo.IpRanges = newRanges
         fmt.Printf("after increasing len & cap: len: %v, cap: %v\n", len(cInfo.IpRanges), cap(cInfo.IpRanges))
      } else {
         newRanges = make([]IpDbRange, lenRanges+1, capRanges)
         copy(newRanges, cInfo.IpRanges)
         cInfo.IpRanges = newRanges
         fmt.Printf("after increasing len: len: %v, cap: %v\n", len(cInfo.IpRanges), cap(cInfo.IpRanges))
      }
      //_ = append(cInfo.IpRanges, IpDbRange{IpLo:row.IpLo, IpHi:row.IpHi})
   }
   cInfo.IpRanges[len(cInfo.IpRanges)-1] = IpDbRange{IpLo:row.IpLo, IpHi:row.IpHi}
}

var countries IpDbCountries

func main() {
   countries = make(IpDbCountries)

   process_line(IP2LocRec{IpLo: "0", IpHi: "10", CCode: "US", CName: "Unated States"})
   //process_line(IP2LocRec{IpLo: "11", IpHi: "20", CCode: "SU", CName: "Soviet Union"})
   //process_line(IP2LocRec{IpLo: "41", IpHi: "50", CCode: "IL", CName: "Israel"})
   process_line(IP2LocRec{IpLo: "21", IpHi: "30", CCode: "US", CName: "Unated States"})
   //process_line(IP2LocRec{IpLo: "31", IpHi: "40", CCode: "SU", CName: "Soviet Union"})
   //process_line(IP2LocRec{IpLo: "51", IpHi: "60", CCode: "IL", CName: "Israel"})
   process_line(IP2LocRec{IpLo: "61", IpHi: "70", CCode: "US", CName: "Unated States"})
   //process_line(IP2LocRec{IpLo: "71", IpHi: "80", CCode: "SU", CName: "Soviet Union"})
   //process_line(IP2LocRec{IpLo: "81", IpHi: "90", CCode: "IL", CName: "Israel"})
   process_line(IP2LocRec{IpLo: "91", IpHi: "100", CCode: "US", CName: "Unated States"})
   //process_line(IP2LocRec{IpLo: "101", IpHi: "110", CCode: "SU", CName: "Soviet Union"})
   //process_line(IP2LocRec{IpLo: "111", IpHi: "120", CCode: "IL", CName: "Israel"})

   for cCode, cInfo := range countries {
      fmt.Printf("Country code: %v, name: %v\n", cCode, cInfo.CName)
      for iRange := 0; iRange < len(cInfo.IpRanges); iRange++ {
         ipRange := cInfo.IpRanges[iRange]
         fmt.Printf("\tRange lo: %v, range hi: %v", ipRange.IpLo, ipRange.IpHi)
      }
      fmt.Printf("\n")
   }
}
```
