é·ãã®ã§çµè«ã ãå ã«ã BDD風å³ã«éåæãç¡ããªããGinkgoããªã¹ã¹ã¡ã ãã£ã¨è»½ãã¦ã·ã³ãã«ãªã®ãè¯ããªããTestifyããªã¹ã¹ã¡ã ãã¹ã対象ã¨ãªãã³ã¼ã å ¬å¼ã®How to Write Go CodeããYour first libraryã«ããã³ã¼ããæã£ã¦ãã¾ãã package go_testing // Sqrt returns an approximation to the square root of x. func Sqrt(x float64) float64 { z := 1.0 for i := 0; i < 1000; i++ { z -= (z*z - x) / (2 * z) } return z } æ¨æºã§çµè¾¼ã¾ãã¦ãããã¹ãç¨ã©ã¤ãã©ãªã«ã¤ã㦠testing.* å®ç¨æ§ã¯ç¢ºãã«ãã£ã¦å¿ è¦ãªãã®ã¯æã£ã¦ãæããã®ã ãã©ãåã«ã¯ããã°ããã®è¾ã¿ãã
{{#tags}}- {{label}}
{{/tags}}