MCPcopy
hub / github.com/syncthing/syncthing / saveValidLangs

Function saveValidLangs

script/weblatedl.go:118–127  ·  view source on GitHub ↗
(langs []string)

Source from the content-addressed store, hash-verified

116}
117
118func saveValidLangs(langs []string) {
119 slices.Sort(langs)
120 fd, err := os.Create("valid-langs.js")
121 if err != nil {
122 log.Fatal(err)
123 }
124 fmt.Fprint(fd, "var validLangs = ")
125 json.NewEncoder(fd).Encode(langs)
126 fd.Close()
127}
128
129func saveLanguageNames(names map[string]string) {
130 fd, err := os.Create("prettyprint.js")

Callers 1

mainFunction · 0.70

Calls 4

SortMethod · 0.80
FatalMethod · 0.80
CreateMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected