MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / WriteFile

Method WriteFile

pkg/i18n/i18n.go:194–200  ·  view source on GitHub ↗

WriteFile writes the descriptors to a file.

(filename string)

Source from the content-addressed store, hash-verified

192
193// WriteFile writes the descriptors to a file.
194func (m MessageDescriptorMap) WriteFile(filename string) error {
195 bytes, err := json.MarshalIndent(m, "", " ")
196 if err != nil {
197 return err
198 }
199 return os.WriteFile(filename, append(bytes, '\n'), 0o644) //nolint:gas
200}
201
202// Define a message.
203func (m MessageDescriptorMap) Define(id, message string) *MessageDescriptor {

Callers 15

mainFunction · 0.80
mainFunction · 0.80
writeToFileFunction · 0.80
fixBunSplitFunction · 0.80
installHookMethod · 0.80
CertificatesMethod · 0.80
GenGatewayCAMethod · 0.80
GenGatewayCertsMethod · 0.80
FilesMethod · 0.80
WriteMethod · 0.80
testBandFunction · 0.80
compareMessageToGoldenFunction · 0.80

Calls

no outgoing calls

Tested by 4

testBandFunction · 0.64
compareMessageToGoldenFunction · 0.64
TestI18NFunction · 0.64
TestMarshalersFunction · 0.64