mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	use experimental go json v2 library (#35392)
details: https://pkg.go.dev/encoding/json/v2 --------- Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -365,11 +365,11 @@ func GenerateEmbedBindata(fsRootPath, outputFile string) error { | ||||
| 	if err = embedFiles(meta.Root, fsRootPath, ""); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	jsonBuf, err := json.Marshal(meta) // can't use json.NewEncoder here because it writes extra EOL | ||||
| 	jsonBuf, err := json.Marshal(meta) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	_, _ = output.Write([]byte{'\n'}) | ||||
| 	_, err = output.Write(jsonBuf) | ||||
| 	_, err = output.Write(bytes.TrimSpace(jsonBuf)) | ||||
| 	return err | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user