const os.O_TRUNC

8 uses

	os (current package)
		file.go#L81: 	O_TRUNC  int = syscall.O_TRUNC  // truncate regular writable file when opened.
		file.go#L320: 	return OpenFile(name, O_RDWR|O_CREATE|O_TRUNC, 0666)
		file.go#L696: 	f, err := OpenFile(name, O_WRONLY|O_CREATE|O_TRUNC, perm)

	github.com/go-git/go-billy/v5/osfs
		os.go#L28: 	return fs.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, defaultCreateMode)

	github.com/go-git/go-billy/v5/util
		util.go#L100: 	f, err := fs.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, perm)

	github.com/go-git/go-git/v5
		worktree.go#L539: 	to, err := w.Filesystem.OpenFile(f.Name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, mode.Perm())
		worktree.go#L571: 		to, err := w.Filesystem.OpenFile(f.Name, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, mode.Perm())

	github.com/go-git/go-git/v5/storage/filesystem/dotgit
		dotgit_setref.go#L25: 		mode |= os.O_TRUNC