public sealed class Artifacts.Types.GoModule : IMessage<Artifacts.Types.GoModule>, IEquatable<Artifacts.Types.GoModule>, IDeepCloneable<Artifacts.Types.GoModule>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Build v1 API class Artifacts.Types.GoModule.
Go module to upload to Artifact Registry upon successful completion of all
build steps. A module refers to all dependencies in a go.mod file.
Optional. The Go module's semantic version in the form vX.Y.Z. e.g.
v0.1.1 Pre-release identifiers can also be added by appending a dash and
dot separated ASCII alphanumeric characters and hyphens.
e.g. v0.2.3-alpha.x.12m.5
Optional. Source path of the go.mod file in the build's workspace. If not
specified, this will default to the current directory.
e.g. ~/code/go/mypackage
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-19 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eArtifacts.Types.GoModule\u003c/code\u003e class within the Google Cloud Build v1 API, detailing its functionality for uploading Go modules to Artifact Registry.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGoModule\u003c/code\u003e class, which is used for managing Go module artifacts, includes properties like \u003ccode\u003eModulePath\u003c/code\u003e, \u003ccode\u003eModuleVersion\u003c/code\u003e, \u003ccode\u003eRepositoryLocation\u003c/code\u003e, \u003ccode\u003eRepositoryName\u003c/code\u003e, \u003ccode\u003eRepositoryProjectId\u003c/code\u003e, and \u003ccode\u003eSourcePath\u003c/code\u003e to configure the module's details and location.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions of the Google.Cloud.CloudBuild.V1 API documented, from version 1.0.0 up to the latest version 2.15.0, each with their own reference to the GoModule.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGoModule\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, enabling features like serialization, equality comparison, deep cloning, and efficient data handling.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the GoModule that is referenced within this documentation is version 2.15.0, and it is a sealed class, meaning that it cannot be inherited from.\u003c/p\u003e\n"]]],[],null,["# Cloud Build v1 API - Class Artifacts.Types.GoModule (2.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.16.0 (latest)](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.15.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.14.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.13.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.12.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.11.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.10.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.9.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.8.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.7.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.6.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.5.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.4.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.3.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.2.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.1.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.0.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.4.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.3.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.2.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.1.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.0.0/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule) \n\n public sealed class Artifacts.Types.GoModule : IMessage\u003cArtifacts.Types.GoModule\u003e, IEquatable\u003cArtifacts.Types.GoModule\u003e, IDeepCloneable\u003cArtifacts.Types.GoModule\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Build v1 API class Artifacts.Types.GoModule.\n\nGo module to upload to Artifact Registry upon successful completion of all\nbuild steps. A module refers to all dependencies in a go.mod file. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Artifacts.Types.GoModule \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Artifacts](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts.Types)[GoModule](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Artifacts](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts.Types)[GoModule](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Artifacts](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts.Types)[GoModule](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Artifacts.Types.GoModule), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.CloudBuild.V1](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.CloudBuild.V1.dll\n\nConstructors\n------------\n\n### GoModule()\n\n public GoModule()\n\n### GoModule(GoModule)\n\n public GoModule(Artifacts.Types.GoModule other)\n\nProperties\n----------\n\n### ModulePath\n\n public string ModulePath { get; set; }\n\nOptional. The Go module's \"module path\".\ne.g. example.com/foo/v2\n\n### ModuleVersion\n\n public string ModuleVersion { get; set; }\n\nOptional. The Go module's semantic version in the form vX.Y.Z. e.g.\nv0.1.1 Pre-release identifiers can also be added by appending a dash and\ndot separated ASCII alphanumeric characters and hyphens.\ne.g. v0.2.3-alpha.x.12m.5\n\n### RepositoryLocation\n\n public string RepositoryLocation { get; set; }\n\nOptional. Location of the Artifact Registry repository. i.e. us-east1\nDefaults to the build's location.\n\n### RepositoryName\n\n public string RepositoryName { get; set; }\n\nOptional. Artifact Registry repository name.\n\nSpecified Go modules will be zipped and uploaded to Artifact Registry\nwith this location as a prefix.\ne.g. my-go-repo\n\n### RepositoryProjectId\n\n public string RepositoryProjectId { get; set; }\n\nOptional. Project ID of the Artifact Registry repository.\nDefaults to the build project.\n\n### SourcePath\n\n public string SourcePath { get; set; }\n\nOptional. Source path of the go.mod file in the build's workspace. If not\nspecified, this will default to the current directory.\ne.g. \\~/code/go/mypackage"]]