{"id":414963,"date":"2024-06-30T00:04:31","date_gmt":"2024-06-30T00:04:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=414963"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-30T00:04:31","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=414963","title":{"rendered":"<span>\u041f\u0438\u0448\u0435\u043c \u043d\u0430 Go \u043a\u0430\u043a \u0432 Google. \u041b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 \u2014 \u0447\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u0430\u044f<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h1 id=\"rekomendacii-po-stilyu-dlya-proektov-google-s-otkrytym-ishodnym-kodom\">\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0438\u043b\u044e \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Google \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/h1>\n<p>  <\/p>\n<h2 id=\"luchshie-praktiki-go\">\u041b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 Go<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u2014 \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u00a0<a href=\"https:\/\/google.github.io\/styleguide\/go\/index\">\u0441\u0442\u0438\u043b\u044e Go<\/a> \u0432 Google. \u041e\u043d \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>\u043d\u0438 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#normative\">\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u043c<\/a>, \u043d\u0438 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#canonical\">\u043a\u0430\u043d\u043e\u043d\u0438\u0447\u043d\u044b\u043c<\/a><\/strong>, \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u00ab<a href=\"https:\/\/google.github.io\/styleguide\/go\/guide\">\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043f\u043e \u0441\u0442\u0438\u043b\u044e<\/a>\u00bb. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#about\">\u041e\u0431\u0437\u043e\u0440\u0435<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"o-dokumentehttpshabrcomrucompaniesskillfactoryarticles729924about\">\u041e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435<\/h2>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c\u00a0\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u00ab\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0441\u0442\u0438\u043b\u044e\u00bb \u0434\u043b\u044f Go. \u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0435 \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0447\u0430\u0441\u0442\u043d\u043e\u043c\u0443 \u0441\u043b\u0443\u0447\u0430\u044e. \u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432, \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0432 \u0442\u0435\u043a\u0441\u0442 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c\u0438 \u043e \u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b, \u0430 \u043a\u043e\u0433\u0434\u0430 \u2014 \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0441\u0442\u0438\u043b\u044e\u00a0\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#about\">\u043e\u0431\u0437\u043e\u0440\u0435<\/a>.<\/p>\n<p><a name=\"habracut\"><\/a><br \/>  <a name=\"naming\"><\/a>  <\/p>\n<h2 id=\"imenovaniehttpshabrcomrucompaniesskillfactoryarticles729924naming\">\u0418\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<h3 id=\"imena-funkciy-i-metodovhttpshabrcomrucompaniesskillfactoryarticles729924function-and-method-names\">\u0418\u043c\u0435\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/h3>\n<p>  <\/p>\n<h4 id=\"izbegayte-povtoreniyhttpshabrcomrucompaniesskillfactoryarticles729924avoid-repetition\">\u0418\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439<\/h4>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u00a0\u044d\u0442\u043e \u0438\u043c\u044f \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u043b\u0438\u0448\u043d\u0438\u0445 <a href=\"https:\/\/google.github.io\/styleguide\/go\/decisions#repetition\">\u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439<\/a> \u0432 \u0442\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u0430, \u0441\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c \u043d\u0438\u0436\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p>\u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0442\u0438\u043f\u044b \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0435\u0441\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0435 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0443;<\/li>\n<li>\u0442\u0438\u043f \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430 \u043c\u0435\u0442\u043e\u0434\u0430;<\/li>\n<li>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<\/ul>\n<p>  <\/li>\n<li>\u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043d\u0435 <a href=\"https:\/\/google.github.io\/styleguide\/go\/decisions#repetitive-with-package\">\u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0439\u0442\u0435 \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430<\/a>.<\/li>\n<\/ul>\n<p>  <\/p>\n<pre><code class=\"go\"> \/\/ \u041f\u043b\u043e\u0445\u043e:  package yamlconfig   func ParseYAMLConfig(input string) (*Config, error)<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\"> \/\/ \u0425\u043e\u0440\u043e\u0448\u043e:  package yamlconfig   func Parse(input string) (*Config, error)<\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\n<p>\u0412 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0439\u0442\u0435 \u0438\u043c\u044f \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: func (c *Config) WriteConfigTo(w io.Writer) (int64, error)<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func (c *Config) WriteTo(w io.Writer) (int64, error)<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u041d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0439\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435\u00a0\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: func OverrideFirstWithSecond(dest, source *Config) error<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func Override(dest, source *Config) error<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u041d\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0439\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u0442\u0438\u043f\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: func TransformYAMLToJSON(input *Config) *jsonconfig.Config<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func Transform(input *Config) *jsonconfig.Config<\/code><\/pre>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u0438\u043c\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func (c *Config) WriteTextTo(w io.Writer) (int64, error) func (c *Config) WriteBinaryTo(w io.Writer) (int64, error)<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"preobrazovanie-imenhttpshabrcomrucompaniesskillfactoryarticles729924naming-conventions\">\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0435\u043d<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>\n<p>\u0418\u043c\u0435\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439\u00a0\u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u044b \u043e\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func (c *Config) JobName(key string) (value string, ok bool)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c,\u00a0\u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 <a href=\"https:\/\/google.github.io\/styleguide\/go\/decisions#getters\"><code>Get<\/code><\/a> \u0432 \u0438\u043c\u0435\u043d\u0430\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: func (c *Config) GetJobName(key string) (value string, ok bool)<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u043c\u0435\u043d\u0430\u00a0\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439\u00a0\u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u044b \u043e\u0442 \u0433\u043b\u0430\u0433\u043e\u043b\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func (c *Config) WriteDetail(w io.Writer) (int64, error)<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>\u0418\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u0442\u0438\u043f\u043e\u043c, \u0432 \u043a\u043e\u043d\u0446\u0435 \u0438\u043c\u0435\u043d\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u043c\u044f \u0442\u0438\u043f\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func ParseInt(input string) (int, error) func ParseInt64(input string) (int64, error) func AppendInt(buf []byte, value int) []byte func AppendInt64(buf []byte, value int64) []byte<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u00ab\u043f\u0435\u0440\u0432\u0438\u0447\u043d\u0430\u044f\u00bb \u0432\u0435\u0440\u0441\u0438\u044f, \u0442\u0438\u043f \u0432 \u0435\u0435 \u0438\u043c\u0435\u043d\u0438\u00a0\u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func (c *Config) Marshal() ([]byte, error) func (c *Config) MarshalText() (string, error)<\/code><\/pre>\n<p>  <a name=\"test-double-packages-and-types\"><\/a>  <\/p>\n<h3 id=\"testovye-dubli-paketov-i-tipovhttpshabrcomrucompaniesskillfactoryarticles729924test-double-packages-and-types\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0443\u0431\u043b\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0442\u0438\u043f\u043e\u0432<\/h3>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 <a href=\"https:\/\/google.github.io\/styleguide\/go\/guide#naming\">\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438<\/a> \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0442\u0438\u043f\u043e\u0432,\u00a0\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Test_double\">\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0443\u0431\u043b\u0435\u0439 (test doubles)<\/a>, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0430\u0432\u0438\u043b. \u041f\u043e \u0441\u0432\u043e\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0434\u0443\u0431\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u043e\u0439 (stub), \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c-\u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0435\u0439 (fake), \u043c\u0430\u043a\u0435\u0442\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (mock) \u0438\u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0448\u043f\u0438\u043e\u043d\u043e\u043c (spy).<\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0440\u0435\u0447\u044c, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u0434\u0435\u0442 \u043e \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0438\u043c\u0435\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">package creditcard  import (  \"errors\"   \"path\/to\/money\" )  \/\/ ErrDeclined \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u044d\u043c\u0438\u0442\u0435\u043d\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u0442 \u043f\u043b\u0430\u0442\u0435\u0436. var ErrDeclined = errors.New(\"creditcard: declined\")  \/\/ \u041a\u0430\u0440\u0442\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0435, \u0442\u0430\u043a\u0443\u044e \u200b\u200b\u043a\u0430\u043a \u0435\u0435 \u044d\u043c\u0438\u0442\u0435\u043d\u0442, \/\/ \u0441\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043b\u0438\u043c\u0438\u0442. type Card struct {  }  \/\/ \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u044b\u043c\u0438 \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \/\/ \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a \u0432\u0437\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u044b, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f, \u0432\u043e\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430. type Service struct {  }  func (s *Service) Charge(c *Card, amount money.Money) error { \/* \u043e\u043f\u0443\u0449\u0435\u043d\u043e *\/ }<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"sozdanie-vspomogatelnyh-testovyh-paketov-test-helper-packageshttpshabrcomrucompaniesskillfactoryarticles729924creating-test-helper-packages\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 (test helper packages)<\/h4>\n<p>  <\/p>\n<p>\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0443\u0431\u043b\u044f\u043c\u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c <code>package creditcard<\/code>, \u0432\u0437\u044f\u0442\u044b\u043c \u0438\u0437 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442: \u043c\u043e\u0436\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 Go, \u0441\u043e\u0437\u0434\u0430\u0432 \u0435\u0433\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u0430\u043a\u0435\u0442\u044b,\u00a0\u043a \u0438\u043c\u0435\u043d\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u043f\u0440\u0438\u043f\u0438\u0448\u0435\u043c \u0441\u043b\u043e\u0432\u043e <code>test<\/code>: (&#171;creditcard&#187; + &#171;test&#187;):<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: package creditcardtest<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0438\u043d\u043e\u0435, \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 <code>package creditcardtest<\/code>.<\/p>\n<p>  <\/p>\n<h4 id=\"prostoy-primerhttpshabrcomrucompaniesskillfactoryarticles729924simple-case\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h4>\n<p>  <\/p>\n<p>\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0443\u0431\u043b\u0435\u0439 \u0434\u043b\u044f Service. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Card \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430, \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e Protocol Buffer, \u043e\u043d \u043d\u0435 \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0443\u0431\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Service), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: import (  \"path\/to\/creditcard\"  \"path\/to\/money\" )  \/\/ Stub \u0437\u0430\u0433\u043b\u0443\u0448\u0430\u0435\u0442 creditcard.Service \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f. type Stub struct{}  func (Stub) Charge(*creditcard.Card, money.Money) error { return nil }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 <code>StubService<\/code> \u0438\u043b\u0438, \u0445\u0443\u0436\u0435 \u0442\u043e\u0433\u043e, <code>StubCreditCardService<\/code>, \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0431\u043e\u0440 \u0438\u043c\u0435\u043d\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f, \u0432\u0435\u0434\u044c \u0438\u043c\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0438 \u0442\u0438\u043f\u044b \u0435\u0433\u043e \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0434\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e <code>creditcardtest.Stub<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0435\u0441\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0432 Bazel, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e <code>go_library<\/code> \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u043e \u043a\u0430\u043a <code>testonly<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\"># Good: go_library(  name = \"creditcardtest\",  srcs = [\"creditcardtest.go\"],  deps = [  \":creditcard\",  \":money\",  ],  testonly = True, )<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439,\u00a0\u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/google.github.io\/styleguide\/go\/index.html#gotip\">\u0421\u043e\u0432\u0435\u0442 \u2116 42 \u043f\u043e Go: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438 (Authoring a Stub for Testing)<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h4 id=\"povedenie-neskolkih-testovyh-dubleyhttpshabrcomrucompaniesskillfactoryarticles729924multiple-test-double-behaviors\">\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0443\u0431\u043b\u0435\u0439<\/h4>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0437\u0430\u0433\u043b\u0443\u0448\u0435\u043a (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u0430\u00a0\u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443), \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c \u0438\u043c\u0435\u043d\u0430, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>Stub<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u0432 <code>AlwaysCharges<\/code> \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443 \u2014\u00a0<code>AlwaysDeclines<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: \/\/ AlwaysCharges \u2014 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430 creditcard.Service, \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0443\u0441\u043f\u0435\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. type AlwaysCharges struct{}  func (AlwaysCharges) Charge(*creditcard.Card, money.Money) error { return nil }  \/\/ AlwaysDeclines \u2014 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0430 creditcard.Service, \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. type AlwaysDeclines struct{}  func (AlwaysDeclines) Charge(*creditcard.Card, money.Money) error {  return creditcard.ErrDeclined }<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"neskolko-dubley-dlya-neskolkih-tipovhttpshabrcomrucompaniesskillfactoryarticles729924multiple-doubles-for-multiple-types\">\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0443\u0431\u043b\u0435\u0439 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432<\/h4>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e <code>package creditcard<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432, \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435 \u0434\u043b\u044f <code>Service<\/code> \u0438 <code>StoredValue<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">package creditcard  type Service struct {  }  type Card struct {  }  \/\/ StoredValue \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0440\u0435\u0434\u0438\u0442\u043d\u044b\u043c\u0438 \u0431\u0430\u043b\u0430\u043d\u0441\u0430\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430  \/\/ \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u0432\u0430\u0440 \u0437\u0430\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0447\u0435\u0442  \/\/\u00a0\u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0430 \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u044d\u043c\u0438\u0442\u0435\u043d\u0442\u043e\u043c \u043a\u0440\u0435\u0434\u0438\u0442\u0430. \u041f\u043e \u044d\u0442\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043e\u043d \/\/ \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441. type StoredValue struct {  }  func (s *StoredValue) Credit(c *Card, amount money.Money) error { \/* \u043e\u043f\u0443\u0449\u0435\u043d\u043e *\/ }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0434\u0443\u0431\u043b\u044f\u043c \u0431\u043e\u043b\u0435\u0435 \u044f\u0432\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: type StubService struct{}  func (StubService) Charge(*creditcard.Card, money.Money) error { return nil }  type StubStoredValue struct{}  func (StubStoredValue) Credit(*creditcard.Card, money.Money) error { return nil }<\/code><\/pre>\n<p>  <\/p>\n<h4 id=\"lokalnye-peremennye-v-testahhttpshabrcomrucompaniesskillfactoryarticles729924local-variables-in-tests\">\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445<\/h4>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0434\u0443\u0431\u043b\u044f\u043c, \u0438\u0445 \u0438\u043c\u0435\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0447\u0435\u0442\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c \u0434\u0443\u0431\u043b\u0438 \u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">package payment  import (  \"path\/to\/creditcard\"  \"path\/to\/money\" )  type CreditCard interface {  Charge(*creditcard.Card, money.Money) error }  type Processor struct {  CC CreditCard }  var ErrBadInstrument = errors.New(\"payment: instrument is invalid or expired\")  func (p *Processor) Process(c *creditcard.Card, amount money.Money) error {  if c.Expired() {  return ErrBadInstrument  }  return p.CC.Charge(c, amount) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0434\u0443\u0431\u043b\u044c <code>CreditCard<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &#171;spy&#187; \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u0440\u0430\u0431\u043e\u0447\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u043f\u0435\u0440\u0435\u0434 \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u044f\u0441\u043d\u043e\u0441\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: package payment  import \"path\/to\/creditcardtest\"  func TestProcessor(t *testing.T) {  var spyCC creditcardtest.Spy   proc := &amp;Processor{CC: spyCC}   \/\/ \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0443\u0449\u0435\u043d\u044b: \u043a\u0430\u0440\u0442\u0430 \u0438 \u0441\u0443\u043c\u043c\u0430  if err := proc.Process(card, amount); err != nil {  t.Errorf(\"proc.Process(card, amount) = %v, want %v\", got, want)  }   charges := []creditcardtest.Charge{  {Card: card, Amount: amount},  }   if got, want := spyCC.Charges, charges; !cmp.Equal(got, want) {  t.Errorf(\"spyCC.Charges = %v, want %v\", got, want)  } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u0447\u0435\u043c \u0431\u0435\u0437 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: package payment  import \"path\/to\/creditcardtest\"  func TestProcessor(t *testing.T) {  var cc creditcardtest.Spy   proc := &amp;Processor{CC: cc}   \/\/ \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0443\u0449\u0435\u043d\u044b: \u043a\u0430\u0440\u0442\u0430 \u0438 \u0441\u0443\u043c\u043c\u0430  if err := proc.Process(card, amount); err != nil {  t.Errorf(\"proc.Process(card, amount) = %v, want %v\", got, want)  }   charges := []creditcardtest.Charge{  {Card: card, Amount: amount},  }   if got, want := cc.Charges, charges; !cmp.Equal(got, want) {  t.Errorf(\"cc.Charges = %v, want %v\", got, want)  } }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"zateneniehttpshabrcomrucompaniesskillfactoryarticles729924shadowing\">\u0417\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<blockquote><p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u043d\u0435\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u2014 \u044d\u0442\u043e <em>\u0441\u043e\u043a\u0440\u044b\u0442\u0438\u0435 (stomping)<\/em> \u0438 <em>\u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435 (shadowing)<\/em>. \u041e\u043d\u0438 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 Go.<\/p><\/blockquote>\n<p>\u041a\u0430\u043a \u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0432 Go \u0435\u0441\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u043c\u0435\u043d\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00a0\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func abs(i int) int {  if i &lt; 0 {  i *= -1  }  return i }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 <a href=\"https:\/\/go.dev\/ref\/spec#Short_variable_declarations\">\u043a\u0440\u0430\u0442\u043a\u043e\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/a> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>:=<\/code> \u0438\u043d\u043e\u0433\u0434\u0430\u00a0\u043d\u043e\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f. \u041c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e <em>\u0441\u043e\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (stomping)<\/em>. \u041e\u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: \/\/ innerHandler \u2014 \u0445\u0435\u043b\u043f\u0435\u0440 \u0434\u043b\u044f\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439\u00a0\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u0440\u0443\u0433\u0438\u043c \u0431\u044d\u043a\u0435\u043d\u0434\u0430\u043c. func (s *Server) innerHandler(ctx context.Context, req *pb.MyRequest) *pb.MyResponse {  \/\/ Unconditionally cap the deadline for this part of request handling.  ctx, cancel := context.WithTimeout(ctx, 3*time.Second)  defer cancel()  ctxlog.Info(\"Capped deadline in inner request\")   \/\/ \u041a\u043e\u0434 \u0437\u0434\u0435\u0441\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443.  \/\/ \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u0442\u0438\u043b\u044c, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u044b \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0435,  \/\/ \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043f\u043e \u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 \u043a\u043e\u0434\u0430 \u043d\u0438 \u043e\u0434\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430  \/\/ \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0439) \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442,   \/\/ \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439.   \/\/ ... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0431\u0443\u0434\u044c\u0442\u0435 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b \u0441 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u043c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043d\u043e\u0432\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u041e\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043d\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e <em>\u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439<\/em>. \u041a\u043e\u0434 \u043f\u043e\u0441\u043b\u0435 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0431\u043b\u043e\u043a\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e. \u041d\u0438\u0436\u0435\u00a0\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u043a\u0440\u0430\u0439\u043d\u0438\u0439 \u0441\u0440\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (deadline) \u043f\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044e:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: func (s *Server) innerHandler(ctx context.Context, req *pb.MyRequest) *pb.MyResponse {  \/\/ \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0441\u0440\u043e\u043a \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c.  if *shortenDeadlines {  ctx, cancel := context.WithTimeout(ctx, 3*time.Second)  defer cancel()  ctxlog.Info(ctx, \"Capped deadline in inner request\")  }   \/\/ \u0411\u0410\u0413: \"ctx\" \u0437\u0434\u0435\u0441\u044c \u0441\u043d\u043e\u0432\u0430 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439   \/\/ \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439.  \/\/ \u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438 ctx, \u0438   \/\/ Cancel \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 if.   \/\/ ... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434\u00a0\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: func (s *Server) innerHandler(ctx context.Context, req *pb.MyRequest) *pb.MyResponse {  if *shortenDeadlines {  var cancel func()  \/\/ \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435, = \u0430 \u043d\u0435 :=.  ctx, cancel = context.WithTimeout(ctx, 3*time.Second)  defer cancel()  ctxlog.Info(ctx, \"Capped deadline in inner request\")  }  \/\/ ... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043a\u0440\u044b\u043b\u0438 (stomping) \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0442, \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c\u044b\u0439 \u0442\u0438\u043f \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0443 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041f\u0440\u0438 \u0437\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0438 (shadowing) \u043c\u044b \u0432\u0432\u043e\u0434\u0438\u043c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f. \u0417\u0430\u0442\u0435\u043d\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u043e \u0437\u0434\u0435\u0441\u044c\u00a0\u0434\u043b\u044f <a href=\"https:\/\/google.github.io\/styleguide\/go\/guide#clarity\">\u044f\u0441\u043d\u043e\u0441\u0442\u0438<\/a> \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043d\u043e\u0432\u043e\u0435 \u0438\u043c\u044f.<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441 \u0438\u043c\u0435\u043d\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442 \u0438\u043c\u0435\u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u2014 \u043d\u0435 \u043b\u0443\u0447\u0448\u0430\u044f \u0438\u0434\u0435\u044f, \u0432\u0435\u0434\u044c \u043d\u0435\u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438. \u0418 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0438\u043c\u0435\u043d\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438\u0437\u0431\u0435\u0433\u0430\u0439\u0442\u0435 \u0438\u043c\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/google.github.io\/styleguide\/go\/decisions#import-renaming\">\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435<\/a> \u0438\u043b\u0438 \u0437\u0430\u0442\u0435\u043d\u0438\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: func LongFunction() {  url := \"https:\/\/example.com\/\"  \/\/ Oops, now we can't use net\/url in code below. }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"pakety-utilhttpshabrcomrucompaniesskillfactoryarticles729924util-packages\">\u041f\u0430\u043a\u0435\u0442\u044b Util<\/h3>\n<p>  <\/p>\n<p>\u041f\u0430\u043a\u0435\u0442\u044b Go \u0438\u043c\u0435\u044e\u0442 \u0438\u043c\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u0430, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u043f\u0443\u0442\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430. \u0418\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0432\u0430\u0436\u043d\u0435\u0435 \u043f\u0443\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u0418\u043c\u0435\u043d\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 Go \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c <a href=\"https:\/\/google.github.io\/styleguide\/go\/decisions#package-names\">\u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441 \u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c<\/a>. \u041d\u0430\u0437\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c: <code>util<\/code>, <code>helper<\/code>, <code>common<\/code> \u0438\u043b\u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043d\u0435 \u043b\u0443\u0447\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 (\u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u0441\u043b\u043e\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c <em>\u0447\u0430\u0441\u0442\u044c\u044e<\/em> \u0438\u043c\u0435\u043d\u0438). \u041d\u0435\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u044f\u044e\u0442 \u0447\u0442\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u0430 \u043f\u0440\u0438 \u0447\u0430\u0441\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0435 <a href=\"https:\/\/google.github.io\/styleguide\/go\/decisions#import-renaming\">\u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u044b \u043f\u0440\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0442\u043e\u0447\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: db := spannertest.NewDatabaseFromFile(...)  _, err := f.Seek(0, io.SeekStart)  b := elliptic.Marshal(curve, x, y)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0435\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 (<code>cloud.google.com\/go\/spanner\/spannertest<\/code>, <code>io<\/code> \u0438 <code>crypto\/elliptic<\/code>). \u0421 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438\u00a0\u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b \u0431\u044b \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u041f\u043b\u043e\u0445\u043e: db := test.NewDatabaseFromFile(...)  _, err := f.Seek(0, common.SeekStart)  b := helper.Marshal(curve, x, y)<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"razmer-paketahttpshabrcomrucompaniesskillfactoryarticles729924package-size\">\u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u0430<\/h2>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043e \u0442\u043e\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0432 Go, \u0438 \u043d\u0443\u0436\u043d\u043e \u043b\u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0432 \u043e\u0434\u0438\u043d \u043f\u0430\u043a\u0435\u0442 \u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u0445 \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c, \u043f\u043e\u0438\u0441\u043a \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0438 \u0432 <a href=\"https:\/\/go.dev\/blog\/package-names\">\u0431\u043b\u043e\u0433\u0430<\/a> \u043e\u0431 \u0438\u043c\u0435\u043d\u0430\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0432 Go. \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0430 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043c\u0435\u043d\u0430\u043c. \u0412 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438, \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u0446\u0438\u0442\u0430\u0442\u044b \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0435\u043c\u0430\u043c.<\/p>\n<p>  <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u043a\u0435\u0442\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u0438\u0434\u044f\u0442 <a href=\"https:\/\/pkg.go.dev\/\">godoc<\/a>, \u0430 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0442\u0438\u043f\u0430\u043c\u0438 \u0438\u0437 \u043f\u0430\u043a\u0435\u0442\u0430, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e \u0438\u0445 \u0442\u0438\u043f\u0443; godoc \u0442\u0430\u043a\u0436\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u043c\u0438 \u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438. \u0415\u0441\u043b\u0438 <em>\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u043c\u0443 \u043a\u043e\u0434\u0443<\/em>,\u00a0\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u0432\u0443\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0434 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0430\u043a\u0435\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u043a\u0435\u0442\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432, <em>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/em> \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u0435\u0441\u043d\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u0430, \u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0430\u043a\u0435\u0442\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438, \u043d\u0435 \u0437\u0430\u0441\u043e\u0440\u044f\u044f \u0434\u0435\u0442\u0430\u043b\u044f\u043c\u0438 \u043e\u0431 \u044d\u0442\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0434\u0438\u043d \u043f\u0430\u043a\u0435\u0442, \u0442\u0430\u043a\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437\u0434\u0443\u0442\u044b\u043c. \u041a\u043e\u0433\u0434\u0430\u00a0\u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0442\u0443\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439, \u043f\u0440\u043e\u0449\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0447\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0438\u043f\u0430 \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\u00a0<code>bytes.Buffer<\/code>, <code>ring.New<\/code>. \u0412 <a href=\"https:\/\/go.dev\/blog\/package-names\">\u044d\u0442\u043e\u0439<\/a> \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u043b\u043e\u0433\u0430 \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0421\u0442\u0438\u043b\u044c Go \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0438\u0431\u043a\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u043e\u0432: \u043f\u0440\u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0435\u0437 \u0443\u0449\u0435\u0440\u0431\u0430 \u0434\u043b\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0445 [\u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u0434\u0430]. \u041d\u043e, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u044b\u0442, \u043d\u0438 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b \u0441\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a, \u043d\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432\u00a0\u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f. \u0412 Go \u043d\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 &#171;\u043e\u0434\u0438\u043d \u0442\u0438\u043f \u2014 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b&#187;. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0435\u0433\u043e\u00a0\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u043b, \u0447\u0442\u043e \u0438 \u0432 \u043a\u0430\u043a\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438\u0441\u043a\u0430\u0442\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0432 \u043d\u0438\u0445 \u0431\u044b\u043b\u043e\u00a0\u043b\u0435\u0433\u0447\u0435\u00a0\u0447\u0442\u043e-\u0442\u043e \u043d\u0430\u0439\u0442\u0438. \u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u0430 \u0447\u0430\u0441\u0442\u043e \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432, \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b. \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u0442\u044c\u00a0\u043a\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u0430 <a href=\"https:\/\/go.dev\/src\/bytes\/\"><code>bytes<\/code><\/a>. \u0412 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0441 \u043e\u0431\u044a\u0435\u043c\u043d\u043e\u0439 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043e\u0434\u0438\u043d\u00a0<code>doc.go<\/code> \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u043b\u044f <a href=\"https:\/\/google.github.io\/styleguide\/go\/decisions#package-comments\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u0430<\/a> \u0438 \u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f. \u0412 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0447\u0442\u043e-\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 Google \u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043d\u0430 Bazel \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u043a\u043e\u0434\u0430 Go \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 Go \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c: \u043c\u043e\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (targets) <code>go_library<\/code> \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c, \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u0430\u043a\u0435\u0442\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433.<\/p>\n<p>  <\/p>\n<p>\u0421\u043c. \u0442\u0430\u043a\u0436\u0435:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/companies\/skillfactory\/articles\/729924\/#test-double-packages-and-types\">\u041f\u0430\u043a\u0435\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0434\u0443\u0431\u043b\u0435\u0439 (Test double packages)<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"importyhttpshabrcomrucompaniesskillfactoryarticles729924imports\">\u0418\u043c\u043f\u043e\u0440\u0442\u044b<\/h2>\n<p>  <\/p>\n<h3 id=\"protokoly-i-zaglushkihttpshabrcomrucompaniesskillfactoryarticles729924protos-and-stubs\">\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0438 \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438<\/h3>\n<p>  <\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 Go \u0432 \u043f\u043b\u0430\u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0440\u043e\u0441\u0441-\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u043e\u0439. \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 proto \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0421\u0443\u0444\u0444\u0438\u043a\u0441 <code>pb<\/code> \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b <code>go_proto_library<\/code>.<\/li>\n<li>\u0421\u0443\u0444\u0444\u0438\u043a\u0441 <code>grpc<\/code> \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u0430\u0432\u0438\u043b <code>go_grpc_library<\/code>.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0444\u0438\u043a\u0441 \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0439 \u0438\u043b\u0438 \u0434\u0432\u0443\u0445 \u0431\u0443\u043a\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: import (  fspb \"path\/to\/package\/foo_service_go_proto\"  fsgrpc \"path\/to\/package\/foo_service_go_grpc\" )<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0430\u043a\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b (proto) \u0438\u043b\u0438 \u043f\u0430\u043a\u0435\u0442 \u0436\u0435\u0441\u0442\u043a\u043e\u00a0\u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443, \u0442\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">import ( pb \"path\/to\/package\/foo\\_service\\_go\\_proto\" grpc \"path\/to\/package\/foo\\_service\\_go\\_grpc\" )<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0435 (generic) \u0438\u043b\u0438 \u043c\u0430\u043b\u043e\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0441\u043b\u043e\u0432\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ \u0425\u043e\u0440\u043e\u0448\u043e: import (  mapspb \"path\/to\/package\/maps_go_proto\" )<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c, \u043a\u043e\u0433\u0434\u0430 \u0441\u0432\u044f\u0437\u044c \u043a\u043e\u0434\u0430 \u0441 \u043a\u0430\u0440\u0442\u0430\u043c\u0438 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430,\u00a0<code>mapspb.Address<\/code> \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c <code>mpb.Address<\/code>.<\/p>\n<p>  <\/p>\n<h3 id=\"poryadok-importahttpshabrcomrucompaniesskillfactoryarticles729924import-ordering\">\u041f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u043c\u043f\u043e\u0440\u0442\u0430<\/h3>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438\u043c\u043f\u043e\u0440\u0442\u044b\u00a0\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0434\u0432\u0430 \u0438 \u0431\u043e\u043b\u0435\u0435\u00a0\u0431\u043b\u043e\u043a\u043e\u0432 \u0432 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>\"fmt\"<\/code>.<\/li>\n<li>\u0414\u0440\u0443\u0433\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\u00a0&#171;\/path\/to\/somelib&#187;.<\/li>\n<li>\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044c\u043d\u044b\u0445 \u0431\u0443\u0444\u0435\u0440\u043e\u0432 protobuf, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\u00a0<code>fpb \"path\/to\/foo_go_proto\"<\/code>.<\/li>\n<li>\u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\u00a0<code>_ \"path\/to\/package\"<\/code>.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043c\u043e\u0440\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430 \u043b\u044e\u0431\u0430\u044f \u044f\u0441\u043d\u0430\u044f, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430 \u0438\u043c\u043f\u043e\u0440\u0442\u0430. \u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 gRPC \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 protobuf.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u0434\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f\u044b, \u0442\u043e \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 <code>goimports<\/code> \u0432\u044b\u0434\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0431 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 <code>goimports<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u043d\u043d\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0438\u0445. \u0415\u0441\u043b\u0438 \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f, \u0430\u0432\u0442\u043e\u0440\u044b \u0438 \u043c\u0435\u0439\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043a\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439\u00a0\u043f\u043e\u043b\u043d\u0443\u044e \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043b\u0438\u0448\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0441\u043a\u043e\u0440\u043e \u043c\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0435\u0433\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435. \u0410 \u043f\u043e\u043a\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043e\u043f\u044b\u0442 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u043a\u0443\u0440\u0441\u0430\u0445:<\/p>\n<p>  <\/p>\n<p><a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_200423&amp;utm_term=conc\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rz\/4h\/ne\/rz4hnexx9lidivxbzuaheff5usq.png\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/rz\/4h\/ne\/rz4hnexx9lidivxbzuaheff5usq.png\"\/><\/a><\/p>\n<p>  <\/p>\n<ul>\n<li><u><a href=\"https:\/\/skillfactory.ru\/backend-razrabotchik-na-golang?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_go_200423&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u00abBackend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Go\u00bb (12 \u043c\u0435\u0441\u044f\u0446\u0435\u0432)<\/a><\/u><\/li>\n<li><u><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_200423&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u00a0Python (16 \u043c\u0435\u0441\u044f\u0446\u0435\u0432)<\/a><\/u><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Data Science \u0438\u00a0Machine Learning<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Analyst<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/matematika-dlya-data-science#syllabus?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mat_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043b\u044f Data Science\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/matematika-i-machine-learning-dlya-data-science?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_matml_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438\u00a0Machine Learning \u0434\u043b\u044f Data Science\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/data-engineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dea_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0Data Engineering<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/machine-learning-i-deep-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mldl_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abMachine Learning \u0438\u00a0Deep Learning\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/machine-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_ml_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0Machine Learning<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Python, \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430\u00a0Python<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/python-for-web-developers?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_pws_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abPython \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/frontend-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fr_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Frontend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/webdev?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_webdev_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/ios-razrabotchik-s-nulya?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_ios_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/android-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_andr_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>Java \u0438\u00a0C#<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/java-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_java_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/java-qa-engineer-testirovshik-po?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_qaja_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0430\u00a0JAVA<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/c-sharp-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cdev_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C#-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/game-razrabotchik-na-unity-i-c-sharp?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_gamedev_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0433\u0440 \u043d\u0430\u00a0Unity<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u041e\u0442\u00a0\u043e\u0441\u043d\u043e\u0432\u00a0\u2014 \u0432\u00a0\u0433\u043b\u0443\u0431\u0438\u043d\u0443<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/algoritmy-i-struktury-dannyh?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_algo_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438\u00a0\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/c-plus-plus-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cplus_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/cyber-security-etichnij-haker?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_hacker_200423&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u00ab\u0411\u0435\u043b\u044b\u0439 \u0445\u0430\u043a\u0435\u0440\u00bb<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p><strong>\u0410\u00a0\u0442\u0430\u043a\u0436\u0435<\/strong><\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/skillfactory.ru\/devops-engineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_devops_200423&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e\u00a0DevOps<\/a><\/li>\n<li><a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_200423&amp;utm_term=cat\">\u0412\u0441\u0435 \u043a\u0443\u0440\u0441\u044b<\/a><\/li>\n<\/ul>\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\/729924\/\"> https:\/\/habr.com\/ru\/articles\/729924\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h1 id=\"rekomendacii-po-stilyu-dlya-proektov-google-s-otkrytym-ishodnym-kodom\">\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0438\u043b\u044e \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 Google \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c<\/h1>\n<p>  <\/p>\n<h2 id=\"luchshie-praktiki-go\">\u041b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 Go<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u2014 \u0447\u0430\u0441\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u043e\u00a0<a href=\"https:\/\/google.github.io\/styleguide\/go\/index\">\u0441\u0442\u0438\u043b\u044e Go<\/a> \u0432 Google. \u041e\u043d \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>\u043d\u0438 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#normative\">\u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u043c<\/a>, \u043d\u0438 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#canonical\">\u043a\u0430\u043d\u043e\u043d\u0438\u0447\u043d\u044b\u043c<\/a><\/strong>, \u044d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u00ab<a href=\"https:\/\/google.github.io\/styleguide\/go\/guide\">\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043f\u043e \u0441\u0442\u0438\u043b\u044e<\/a>\u00bb. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#about\">\u041e\u0431\u0437\u043e\u0440\u0435<\/a>.<\/p>\n<p>  <\/p>\n<h2 id=\"o-dokumentehttpshabrcomrucompaniesskillfactoryarticles729924about\">\u041e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435<\/h2>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c\u00a0\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u043f\u043e \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u00ab\u0420\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0441\u0442\u0438\u043b\u044e\u00bb \u0434\u043b\u044f Go. \u042d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0438\u0435 \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438, \u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0447\u0430\u0441\u0442\u043d\u043e\u043c\u0443 \u0441\u043b\u0443\u0447\u0430\u044e. \u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432, \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0432 \u0442\u0435\u043a\u0441\u0442 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u043c\u0438 \u043e \u0442\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b, \u0430 \u043a\u043e\u0433\u0434\u0430 \u2014 \u043d\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u043e \u0441\u0442\u0438\u043b\u044e\u00a0\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <a href=\"https:\/\/google.github.io\/styleguide\/go\/index#about\">\u043e\u0431\u0437\u043e\u0440\u0435<\/a>.<\/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-414963","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/414963","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=414963"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/414963\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=414963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=414963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=414963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}