Documentation ¶
Index ¶
- func Save(file *File, fileName string) (ferr error)
- type File
- type Key
- func (k *Key) DecodeName() (resID int, resName string, err error)
- func (k *Key) Flag() KeyFlag
- func (k *Key) Name() string
- func (k *Key) RestoreResID(resID int) error
- func (k *Key) SetFlag(flag KeyFlag)
- func (k *Key) SetName(name string)
- func (k *Key) SetValue(value string)
- func (k *Key) SetVersion(version KeyVersion)
- func (k *Key) String() string
- func (k *Key) StripResID() error
- func (k *Key) Value() string
- func (k *Key) Version() KeyVersion
- type KeyFlag
- type KeyVersion
- type Section
- func (s *Section) FilterKey(op func(k *Key) bool)
- func (s *Section) ForEachKey(op func(k *Key))
- func (s *Section) Key(name string) (*Key, *Key)
- func (s *Section) KeyByValue(value string) *Key
- func (s *Section) Keys() []*Key
- func (s *Section) Name() string
- func (s *Section) NewKey(flag KeyFlag, name string, version KeyVersion, value string) (*Key, error)
- func (s *Section) NewKeyAt(atName string, flag KeyFlag, name string, version KeyVersion, value string) (*Key, error)
- func (s *Section) SortKeys()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
File описывате lng-файл
func (*File) NewSection ¶
NewSection добавляет новую секцию
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
Key описывает ключ секции lng-файла
func (*Key) DecodeName ¶
DecodeName декодирует имя, как имя ресурса
func (*Key) RestoreResID ¶
RestoreResID добавляет код ресурса к имени
type KeyVersion ¶
type KeyVersion int
KeyVersion описывает версию ключа
func (KeyVersion) String ¶
func (v KeyVersion) String() string
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section описывает секцию lng-файла
func (*Section) ForEachKey ¶
ForEachKey обходит ключи, выполняя указанную операцию Во время обхода добавлять новые ключи нельзя
func (*Section) Key ¶
Key возвращает ключ по имени, и одноименный ключ с другим флагом TODO: ускорить получение ключа по имени (map[string]*Key)
func (*Section) KeyByValue ¶
KeyByValue возвращает ключ по значению
Click to show internal directories.
Click to hide internal directories.