{"id":468606,"date":"2025-07-25T15:12:55","date_gmt":"2025-07-25T15:12:55","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=468606"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=468606","title":{"rendered":"<span>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 Go<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00a0\u2014 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f\u00a0\u0432\u0435\u0431\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412\u00a0Go \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432\u00a0\u044f\u0437\u044b\u043a \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043e\u0449\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. \u0412\u00a0\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0442\u043e\u043a \u0432\u0435\u0431\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u00a0Go, \u043a\u0430\u043a\u00a0\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041f\u043e\u0442\u043e\u043a \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Go<\/h2>\n<p>\u041f\u0440\u0438\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u00a0Go \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/75e\/e88\/9af\/75ee889af6d93a97eb4b93fa4a555376.png\" width=\"974\" height=\"372\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/75e\/e88\/9af\/75ee889af6d93a97eb4b93fa4a555376.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/75e\/e88\/9af\/75ee889af6d93a97eb4b93fa4a555376.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430\u00a0\u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u00a0\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u043c\u0443 \u0441\u043b\u043e\u044e. \u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u0432\u00a0\u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043e \u0441\u043b\u043e\u0435\u043c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043f\u0440\u0430\u0432\u0438\u043b, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0441\u00a0\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c \u0434\u043b\u044f\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0434\u043b\u044f\u00a0\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u00a0\u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<h2>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a\u00a0\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b. \u042e\u043d\u0438\u0442\u2011\u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b\u00a0\u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430\u00a0\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 \u043a\u043e\u0434\u0430 \u0432\u00a0\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043b\u0438\u00a0\u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u00a0\u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u044e\u043d\u0438\u0442 \u043a\u043e\u0434\u0430 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u0441\u043b\u043e\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0443\u0442\u0438\u043b\u0438\u0442 \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0430\u00a0\u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0432\u00a0\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438. \u0421\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u043a\u0435\u0442\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0432\u043e\u0434\u043e\u043c \u0438 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u043a\u0430\u043a\u00a0\u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432\u00a0Go \u043f\u0430\u043a\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438\u00a0\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043f\u0430\u043a\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 testify. \u042d\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043e\u00a0\u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0438.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0435\u0441\u0442\u0430<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443\u00a0\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0438 \u0443\u00a0\u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"go\">type AuthService interface { \u00a0\u00a0\u00a0 Authenticate(username string, password string) (bool, error) }  type AuthServiceImpl struct { \u00a0\u00a0\u00a0 validator ValidationService \u00a0\u00a0\u00a0 repo\u00a0\u00a0\u00a0\u00a0\u00a0 UserRepository }  func NewAuthServiceImpl(validator ValidationService, repo UserRepository) AuthService { \u00a0\u00a0\u00a0 return &amp;AuthServiceImpl{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 validator: validator, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 repo:\u00a0\u00a0\u00a0\u00a0\u00a0 repo, \u00a0\u00a0\u00a0 } }  func (s *AuthServiceImpl) Authenticate(username string, password string) (bool, error) { \u00a0\u00a0\u00a0 if err := s.validator.ValidateUsername(username); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 if err := s.validator.ValidatePassword(password); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 return s.repo.Authenticate(username, password) }  \/\/Validation Service  type ValidationService interface { \u00a0ValidateUsername(username string) error \u00a0ValidatePassword(password string) error }   type ValidationServiceImpl struct{}  func (svc *ValidationServiceImpl) ValidateUsername(username string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails }  func (svc *ValidationServiceImpl) ValidatePassword(password string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails  }  type UserRepository interface { \u00a0Authenticate(username string, password string) (bool, error) }  type UserRepositoryImpl struct{}  func (repo *UserRepositoryImpl) Authenticate(username string, password string) (bool, error) { \u00a0\/\/ perform authentication logic \u00a0return true, nil }  type AuthService interface { \u00a0\u00a0\u00a0 Authenticate(username string, password string) (bool, error) }  type AuthServiceImpl struct { \u00a0\u00a0\u00a0 validator ValidationService \u00a0 \u00a0\u00a0repo\u00a0\u00a0\u00a0\u00a0\u00a0 UserRepository }  func NewAuthServiceImpl(validator ValidationService, repo UserRepository) AuthService { \u00a0\u00a0\u00a0 return &amp;AuthServiceImpl{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 validator: validator, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 repo:\u00a0\u00a0\u00a0\u00a0\u00a0 repo, \u00a0\u00a0\u00a0 } }   func (s *AuthServiceImpl) Authenticate(username string, password string) (bool, error) { \u00a0\u00a0\u00a0 if err := s.validator.ValidateUsername(username); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 }  \u00a0\u00a0\u00a0 if err := s.validator.ValidatePassword(password); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 return s.repo.Authenticate(username, password) }  \/\/Validation Service   type ValidationService interface { \u00a0ValidateUsername(username string) error \u00a0ValidatePassword(password string) error }  type ValidationServiceImpl struct{}  func (svc *ValidationServiceImpl) ValidateUsername(username string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails }  func (svc *ValidationServiceImpl) ValidatePassword(password string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails  }  type UserRepository interface { \u00a0Authenticate(username string, password string) (bool, error) }  type UserRepositoryImpl struct{}  func (repo *UserRepositoryImpl) Authenticate(username string, password string) (bool, error) { \u00a0\/\/ perform authentication logic \u00a0return true, nil  }<\/code><\/pre>\n<p> \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 <code>ValidationService<\/code> \u0438 <code>UserRepository<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 testity\/mock. <\/p>\n<pre><code class=\"go\">type MockValidationService struct { \u00a0mock.Mock }  func (m *MockValidationService) ValidateUsername(username string) error { \u00a0args := m.Called(username) \u00a0return args.Error(0) }  func (m *MockValidationService) ValidatePassword(password string) error { \u00a0args := m.Called(password) \u00a0return args.Error(0) }  type MockUserRepository struct { \u00a0mock.Mock }  \u00a0func (m *MockUserRepository) Authenticate(username string, password string) (bool, error) {  \u00a0args := m.Called(username, password) \u00a0return args.Bool(0), args.Error(1) }  \u00a0  func TestAuthenticate(t *testing.T) { \u00a0username := \"testuser\" \u00a0password := \"testpassword\"   mockValidator := new(MockValidationService) \u00a0mockValidator.On(\"ValidateUsername\", username).Return(nil) \u00a0mockValidator.On(\"ValidatePassword\", password).Return(nil) \u00a0mockRepo := new(MockUserRepository) \u00a0mockRepo.On(\"Authenticate\", username, password).Return(true, nil) \u00a0authService := NewAuthServiceImpl(mockValidator, mockRepo) \u00a0authenticated, err := authService.Authenticate(username, password)  \u00a0if err != nil { \u00a0 t.Errorf(\"Unexpected error: %v\", err) \u00a0}  \u00a0if !authenticated { \u00a0 t.Error(\"Expected authentication to succeed, but it failed\") \u00a0} }<\/code><\/pre>\n<p>\u0412\u00a0\u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u043a\u0435\u0442 mock \u0438\u0437\u00a0\u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 testify \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 <code>ValidationService<\/code> \u0438 <code>UserRepository<\/code> \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <code>MockValidationService<\/code> \u0438 <code>MockUserRepository<\/code>. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 On, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043c\u0430\u043a\u0435\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432\u00a0\u043c\u0435\u0442\u043e\u0434 <code>NewAuthServiceImpl<\/code> \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 <code>AuthService<\/code>.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <code>Authenticate<\/code> \u0441\u00a0\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c. \u041f\u0430\u043a\u0435\u0442 mock \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u0441\u044f \u043e\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u043e\u043d\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a, \u043a\u0430\u043a\u00a0\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0431\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u00a0Go. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u00a0\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u043a\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u00a0\u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<hr\/>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441\u00a0Go \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0430\u0441 \u043d\u0430\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043a\u0443\u0440\u0441\u0430 <strong>\u00ab\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430\u00a0Go\u00bb<\/strong>.<\/p>\n<ul>\n<li>\n<p><strong><em>31\u00a0\u0438\u044e\u043b\u044f \u0432 20:00<\/em><\/strong>\u00a0\u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/wRwY\/\" rel=\"noopener noreferrer nofollow\"><em>\u00ab\u041f\u0441\u0435\u0432\u0434\u043e\u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430 15\u00a0\u043c\u0438\u043d\u0443\u0442: \u0443\u0447\u0438\u043c SoapUI \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0434, \u0447\u0442\u043e\u00a0\u043e\u043d API\u00bb<\/em><\/a>. \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a\u00a0\u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e SoapUI \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0435\u0431\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u0435\u0437\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong><em>12\u00a0\u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432 20:00<\/em><\/strong>\u00a0\u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/g858\/\" rel=\"noopener noreferrer nofollow\"><em>\u00abMITM: \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 VPN \u0437\u043d\u0430\u0435\u0442 \u043e\u00a0\u0432\u0430\u0441 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u0430\u043c\u0430\u00bb<\/em><\/a>. \u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u00a0\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u044d\u0442\u0438\u043c \u0440\u0438\u0441\u043a\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 <a href=\"https:\/\/otus.pw\/COlx\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0441\u0442\u0443\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a>, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0438 \u0432\u0430\u0448\u0438\u0445 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u0443\u0440\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Go.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/930136\/\"> https:\/\/habr.com\/ru\/articles\/930136\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u00a0\u2014 \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u0439 \u0430\u0441\u043f\u0435\u043a\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f\u00a0\u0432\u0435\u0431\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412\u00a0Go \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0432\u00a0\u044f\u0437\u044b\u043a \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u043e\u0449\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. \u0412\u00a0\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0442\u043e\u043a \u0432\u0435\u0431\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u00a0Go, \u043a\u0430\u043a\u00a0\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u041f\u043e\u0442\u043e\u043a \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Go<\/h2>\n<p>\u041f\u0440\u0438\u00a0\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430\u00a0Go \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a\u00a0\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0430\u00a0\u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443. \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u00a0\u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u043c\u0443 \u0441\u043b\u043e\u044e. \u0421\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u0432\u00a0\u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043e \u0441\u043b\u043e\u0435\u043c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0431\u0438\u0437\u043d\u0435\u0441\u2011\u043f\u0440\u0430\u0432\u0438\u043b, \u0430\u00a0\u0442\u0430\u043a\u0436\u0435 \u0441\u00a0\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c \u0434\u043b\u044f\u00a0\u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0443\u0442\u0438\u043b\u0438\u0442\u0430\u043c\u0438 \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0434\u043b\u044f\u00a0\u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u00a0\u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<h2>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u043a\u00a0\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435, \u0442\u0430\u043a \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b. \u042e\u043d\u0438\u0442\u2011\u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b\u00a0\u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430\u00a0\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0435\u0434\u0438\u043d\u0438\u0446 \u043a\u043e\u0434\u0430 \u0432\u00a0\u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u043b\u0438\u00a0\u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u00a0\u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u044e\u043d\u0438\u0442 \u043a\u043e\u0434\u0430 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f\u00a0\u0441\u043b\u043e\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0443\u0442\u0438\u043b\u0438\u0442 \u0438 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0430\u00a0\u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u044f \u0432\u00a0\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438. \u0421\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u043a\u0435\u0442\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0432\u043e\u0434\u043e\u043c \u0438 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u0442\u0430\u043a, \u043a\u0430\u043a\u00a0\u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>\u0414\u043b\u044f\u00a0\u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432\u00a0Go \u043f\u0430\u043a\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438\u00a0\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u043f\u0430\u043a\u0435\u0442, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 testify. \u042d\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043e\u00a0\u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0438.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0435\u0441\u0442\u0430<\/h2>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443\u00a0\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0438 \u0443\u00a0\u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434:<\/p>\n<pre><code class=\"go\">type AuthService interface { \u00a0\u00a0\u00a0 Authenticate(username string, password string) (bool, error) }  type AuthServiceImpl struct { \u00a0\u00a0\u00a0 validator ValidationService \u00a0\u00a0\u00a0 repo\u00a0\u00a0\u00a0\u00a0\u00a0 UserRepository }  func NewAuthServiceImpl(validator ValidationService, repo UserRepository) AuthService { \u00a0\u00a0\u00a0 return &amp;AuthServiceImpl{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 validator: validator, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 repo:\u00a0\u00a0\u00a0\u00a0\u00a0 repo, \u00a0\u00a0\u00a0 } }  func (s *AuthServiceImpl) Authenticate(username string, password string) (bool, error) { \u00a0\u00a0\u00a0 if err := s.validator.ValidateUsername(username); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 if err := s.validator.ValidatePassword(password); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 return s.repo.Authenticate(username, password) }  \/\/Validation Service  type ValidationService interface { \u00a0ValidateUsername(username string) error \u00a0ValidatePassword(password string) error }   type ValidationServiceImpl struct{}  func (svc *ValidationServiceImpl) ValidateUsername(username string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails }  func (svc *ValidationServiceImpl) ValidatePassword(password string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails  }  type UserRepository interface { \u00a0Authenticate(username string, password string) (bool, error) }  type UserRepositoryImpl struct{}  func (repo *UserRepositoryImpl) Authenticate(username string, password string) (bool, error) { \u00a0\/\/ perform authentication logic \u00a0return true, nil }  type AuthService interface { \u00a0\u00a0\u00a0 Authenticate(username string, password string) (bool, error) }  type AuthServiceImpl struct { \u00a0\u00a0\u00a0 validator ValidationService \u00a0 \u00a0\u00a0repo\u00a0\u00a0\u00a0\u00a0\u00a0 UserRepository }  func NewAuthServiceImpl(validator ValidationService, repo UserRepository) AuthService { \u00a0\u00a0\u00a0 return &amp;AuthServiceImpl{ \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 validator: validator, \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 repo:\u00a0\u00a0\u00a0\u00a0\u00a0 repo, \u00a0\u00a0\u00a0 } }   func (s *AuthServiceImpl) Authenticate(username string, password string) (bool, error) { \u00a0\u00a0\u00a0 if err := s.validator.ValidateUsername(username); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 }  \u00a0\u00a0\u00a0 if err := s.validator.ValidatePassword(password); err != nil { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false, err \u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 return s.repo.Authenticate(username, password) }  \/\/Validation Service   type ValidationService interface { \u00a0ValidateUsername(username string) error \u00a0ValidatePassword(password string) error }  type ValidationServiceImpl struct{}  func (svc *ValidationServiceImpl) ValidateUsername(username string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails }  func (svc *ValidationServiceImpl) ValidatePassword(password string) error { \u00a0\/\/ perform validation logic \u00a0return nil \/\/ return nil if validation succeeds, or an error if it fails  }  type UserRepository interface { \u00a0Authenticate(username string, password string) (bool, error) }  type UserRepositoryImpl struct{}  func (repo *UserRepositoryImpl) Authenticate(username string, password string) (bool, error) { \u00a0\/\/ perform authentication logic \u00a0return true, nil  }<\/code><\/pre>\n<p> \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0439 \u0441\u043b\u043e\u0439, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u043a\u0435\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 <code>ValidationService<\/code> \u0438 <code>UserRepository<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 testity\/mock. <\/p>\n<pre><code class=\"go\">type MockValidationService struct { \u00a0mock.Mock }  func (m *MockValidationService) ValidateUsername(username string) error { \u00a0args := m.Called(username) \u00a0return args.Error(0) }  func (m *MockValidationService) ValidatePassword(password string) error { \u00a0args := m.Called(password) \u00a0return args.Error(0) }  type MockUserRepository struct { \u00a0mock.Mock }  \u00a0func (m *MockUserRepository) Authenticate(username string, password string) (bool, error) {  \u00a0args := m.Called(username, password) \u00a0return args.Bool(0), args.Error(1) }  \u00a0  func TestAuthenticate(t *testing.T) { \u00a0username := \"testuser\" \u00a0password := \"testpassword\"   mockValidator := new(MockValidationService) \u00a0mockValidator.On(\"ValidateUsername\", username).Return(nil) \u00a0mockValidator.On(\"ValidatePassword\", password).Return(nil) \u00a0mockRepo := new(MockUserRepository) \u00a0mockRepo.On(\"Authenticate\", username, password).Return(true, nil) \u00a0authService := NewAuthServiceImpl(mockValidator, mockRepo) \u00a0authenticated, err := authService.Authenticate(username, password)  \u00a0if err != nil { \u00a0 t.Errorf(\"Unexpected error: %v\", err) \u00a0}  \u00a0if !authenticated { \u00a0 t.Error(\"Expected authentication to succeed, but it failed\") \u00a0} }<\/code><\/pre>\n<p>\u0412\u00a0\u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u043a\u0435\u0442 mock \u0438\u0437\u00a0\u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 testify \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 <code>ValidationService<\/code> \u0438 <code>UserRepository<\/code> \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 <code>MockValidationService<\/code> \u0438 <code>MockUserRepository<\/code>. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 On, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043c\u0430\u043a\u0435\u0442\u044b \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432\u00a0\u043c\u0435\u0442\u043e\u0434 <code>NewAuthServiceImpl<\/code> \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 <code>AuthService<\/code>.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <code>Authenticate<\/code> \u0441\u00a0\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f\u043c. \u041f\u0430\u043a\u0435\u0442 mock \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u0441\u044f \u043e\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0\u043e\u043d\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a, \u043a\u0430\u043a\u00a0\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0431\u2011\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u00a0Go. \u0422\u0435\u0441\u0442\u0438\u0440\u0443\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u00a0\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043a\u0430\u043a\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430\u00a0\u0440\u0430\u043d\u043d\u0438\u0445 \u044d\u0442\u0430\u043f\u0430\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<hr\/>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441\u00a0Go \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0435\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0430\u0441 \u043d\u0430\u00a0\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0437\u0430\u043d\u044f\u0442\u0438\u044f \u043a\u0443\u0440\u0441\u0430 <strong>\u00ab\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430\u00a0Go\u00bb<\/strong>.<\/p>\n<ul>\n<li>\n<p><strong><em>31\u00a0\u0438\u044e\u043b\u044f \u0432 20:00<\/em><\/strong>\u00a0\u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/wRwY\/\" rel=\"noopener noreferrer nofollow\"><em>\u00ab\u041f\u0441\u0435\u0432\u0434\u043e\u0441\u0435\u0440\u0432\u0435\u0440 \u0437\u0430 15\u00a0\u043c\u0438\u043d\u0443\u0442: \u0443\u0447\u0438\u043c SoapUI \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0434, \u0447\u0442\u043e\u00a0\u043e\u043d API\u00bb<\/em><\/a>. \u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a\u00a0\u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e SoapUI \u044d\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0435\u0431\u2011\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0431\u0435\u0437\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u0430.<\/p>\n<\/li>\n<li>\n<p><strong><em>12\u00a0\u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432 20:00<\/em><\/strong>\u00a0\u2014 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a <a href=\"https:\/\/otus.pw\/g858\/\" rel=\"noopener noreferrer nofollow\"><em>\u00abMITM: \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 VPN \u0437\u043d\u0430\u0435\u0442 \u043e\u00a0\u0432\u0430\u0441 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u0430\u043c\u0430\u00bb<\/em><\/a>. \u041f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u00a0\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0435 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441\u00a0\u044d\u0442\u0438\u043c \u0440\u0438\u0441\u043a\u0430\u0445.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 <a href=\"https:\/\/otus.pw\/COlx\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0441\u0442\u0443\u043f\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/a>, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0438 \u0432\u0430\u0448\u0438\u0445 \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u0443\u0440\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 Go.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/930136\/\"> https:\/\/habr.com\/ru\/articles\/930136\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-468606","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=468606"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/468606\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=468606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=468606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=468606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}