MCPcopy Create free account
hub / github.com/DeAI-Artist/Linkis / createTempFileName

Function createTempFileName

p2p/pex/addrbook_test.go:719–730  ·  view source on GitHub ↗
(prefix string)

Source from the content-addressed store, hash-verified

717}
718
719func createTempFileName(prefix string) string {
720 f, err := os.CreateTemp("", prefix)
721 if err != nil {
722 panic(err)
723 }
724 fname := f.Name()
725 err = f.Close()
726 if err != nil {
727 panic(err)
728 }
729 return fname
730}
731
732func deleteTempFile(fname string) {
733 err := os.Remove(fname)

Callers 14

TestAddrBookPickAddressFunction · 0.85
TestAddrBookSaveLoadFunction · 0.85
TestAddrBookLookupFunction · 0.85
TestAddrBookPromoteToOldFunction · 0.85
TestAddrBookGetSelectionFunction · 0.85
TestAddrBookHasAddressFunction · 0.85
TestBanBadPeersFunction · 0.85
TestAddrBookEmptyFunction · 0.85
TestPrivatePeersFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected