MCPcopy Index your code
hub / github.com/coder/coder / writeDERPMapToFile

Function writeDERPMapToFile

tailnet/test/integration/integration_test.go:416–430  ·  view source on GitHub ↗
(path string, derpMap *tailcfg.DERPMap)

Source from the content-addressed store, hash-verified

414}
415
416func writeDERPMapToFile(path string, derpMap *tailcfg.DERPMap) error {
417 f, err := os.Create(path)
418 if err != nil {
419 return err
420 }
421 defer f.Close()
422
423 enc := json.NewEncoder(f)
424 enc.SetIndent("", " ")
425 err = enc.Encode(derpMap)
426 if err != nil {
427 return err
428 }
429 return nil
430}

Callers 1

TestIntegrationFunction · 0.85

Calls 3

EncodeMethod · 0.80
CreateMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected