golang
TL; DR t.Run ã§ãã¹ããããã¹ããå®è¡ããæãRunã«æ¸¡ãé¢æ°ã¯ãããã¬ãã«ã®ãã¹ããå®è¡ããã¦ããã®ã¨å¥ã®goroutineã§å®è¡ããã¦ããã®ã§Parameterized Testãªããããã£ã¦ãå ´åãå¤æ°ã®ã¹ã³ã¼ãã«æ³¨æãã¾ãããã
Goã®ãã¹ãã§ãã«ãã¼ã¡ã½ãããä½ã£ã¦å ±éã®ã¢ãµã¼ã·ã§ã³ãå®ç¾©ãããã¨ããããã¨æãã¾ãã package test import "testing" func Add(x, y int) int { return x + y } func TestAdd(t *testing.T) { AssertEquals(t, 2, Add(1, 1)) AssertEquals(t, 3, Adâ¦
github.com ã¢ããã¼ã·ã§ã³ã¨ãã¦ã¯ãDatadog Logsã®Webã³ã³ã½ã¼ã«ã¯ã¡ãã»ã¼ã¸ã®å ¨æãé·ãã¨å ¨é¨è¡¨ç¤ºãããªãã£ããæ®éã®tailã¨éã£ã¦æéã®éé ã«ä¸¦ãã ãã§å¾®å¦ã«è¦ã¥ããã£ããããã®ã§ãCLIã§tail -fã³ãã³ãæè¦ã§è¦ãã¦éã«grepã¨ããããã¨æã£ã¦â¦
defer ã¯ãããå®ç¾©ãããé¢æ°ãçµãã£ãã¿ã¤ãã³ã°ã§å®è¡ãããã®ã§ãforã«ã¼ãã§deferãå®ç¾©ãã¦ãã¾ãã¨ãforã«ã¼ããçµãã£ã¦æå±ããé¢æ°ãçµãã£ãã¿ã¤ãã³ã°ã§ä¸æã«å®è¡ãããã package main import "fmt" func main() { for i := 1; i <= 5; i++ {â¦
(2021.10 æ´æ°) ã¾ãããã«æ¸ãã¦ããã¨ãã®ã¾ã¾ãªã®ã§ãããæ¥æ¬èªã®ã¡ã¢ã¨ãã¦ã go install ã§ãã¦ã³ãã¼ãç¨ã®ãã¤ããªãåã£ã¦ãã¦ãdownloadã³ãã³ããæ㤠$ go install golang.org/dl/go1.17.1@latest $ go1.17.1 download Downloaded 0.0% ( 16384 â¦
golangãã¡ãã£ã¨ããã£ã¦ã¾ãã ä»ã¾ã§ä½¿ã£ããã¨ãããè¨èª(Java, Ruby, JavaScriptãªã©)ã«ã¯ç¡ãã£ããã¤ã³ã¿ã«ã¤ã㦠è²ã å®è¡ãã¦ã¿ãçµæãå¼µã£ã¦ããã¾ãã èå¯ ãããªãã¸ã§ã¯ããå¤æ°ã«å ¥ããã¨ã³ãã¼çãªãã®ãä½æãããå ã®å¤æ°ã«ã¯å½±é¿ãä¸ãâ¦