Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,12 @@
path = translations/docs-zh
url = https://github.com/dapr/docs-zh.git
branch = v1.0_content
[submodule "sdkdocs/go"]
path = sdkdocs/go
url = https://github.com/dapr/go-sdk.git
[submodule "sdkdocs/java"]
path = sdkdocs/java
url = https://github.com/dapr/java-sdk.git
[submodule "sdkdocs/js"]
path = sdkdocs/js
url = https://github.com/dapr/js-sdk.git
[submodule "sdkdocs/pluggable-components/go"]
path = sdkdocs/pluggable-components/go
url = https://github.com/dapr-sandbox/components-go-sdk
[submodule "sdkdocs/rust"]
path = sdkdocs/rust
url = https://github.com/dapr/rust-sdk.git
6 changes: 3 additions & 3 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,10 @@ module:
- source: sdkdocs/dotnet/content/en/dotnet-sdk-contributing
target: content/contributing/sdk-contrib/
lang: en
- source: sdkdocs/go/daprdocs/content/en/go-sdk-docs
- source: sdkdocs/go/content/en/go-sdk-docs
target: content/developing-applications/sdks/go
lang: en
- source: sdkdocs/go/daprdocs/content/en/go-sdk-contributing
- source: sdkdocs/go/content/en/go-sdk-contributing
target: content/contributing/sdk-contrib/
lang: en
- source: sdkdocs/java/daprdocs/content/en/java-sdk-docs
Expand All @@ -317,7 +317,7 @@ module:
- source: sdkdocs/pluggable-components/dotnet/content/en/dotnet-sdk-docs
target: content/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet
lang: en
- source: sdkdocs/pluggable-components/go/daprdocs/content/en/go-sdk-docs
- source: sdkdocs/pluggable-components/go/content/en/go-sdk-docs
target: content/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-go
lang: en
- source: translations/docs-zh/translated_content/zh_CN/docs
Expand Down
1 change: 0 additions & 1 deletion sdkdocs/go
Submodule go deleted from 6dd434
25 changes: 25 additions & 0 deletions sdkdocs/go/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Dapr Go SDK documentation

This page covers how the documentation is structured for the Dapr Go SDK

## Dapr Docs

All Dapr documentation is hosted at [docs.dapr.io](https://docs.dapr.io), including the docs for the [Go SDK](https://docs.dapr.io/developing-applications/sdks/go/). Head over there if you want to read the docs.

### Go SDK docs source

Although the docs site code and content is in the [docs repo](https://github.com/dapr/docs), the Go SDK content and images are within the `content` and `static` directories, respectively.

This allows separation of roles and expertise between maintainers, and makes it easy to find the docs files you are looking for.

## Writing Go SDK docs

To get up and running to write Go SDK docs, visit the [docs repo](https://github.com/dapr/docs) to initialize your environment. It will clone both the docs repo and this repo, so you can make changes and see it rendered within the site instantly, as well as commit and PR into this repo.

Make sure to read the [docs contributing guide](https://docs.dapr.io/contributing/contributing-docs/) for information on style/semantics/etc.

## Docs architecture

The docs site is built on [Hugo](https://gohugo.io), which lives in the docs repo. This repo is setup as a git submodule so that when the repo is cloned and initialized, the dotnet-sdk repo, along with the docs, are cloned as well.

Then, in the Hugo configuration file, the `daprdocs/content` and `daprdocs/static` directories are redirected to the `daprdocs/developing-applications/sdks/go` and `static/go` directories, respectively. Thus, all the content within this repo is folded into the main docs site.
23 changes: 23 additions & 0 deletions sdkdocs/go/content/en/go-sdk-contributing/go-contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
type: docs
title: "Contributing to the Go SDK"
linkTitle: "Go SDK"
weight: 3000
description: Guidelines for contributing to the Dapr Go SDK
---

When contributing to the [Go SDK](https://github.com/dapr/go-sdk) the following rules and best-practices should be followed.

## Examples

The `examples` directory contains code samples for users to run to try out specific functionality of the various Go SDK packages and extensions. When writing new and updated samples keep in mind:

- All examples should be runnable on Windows, Linux, and MacOS. While Go code is consistent among operating systems, any pre/post example commands should provide options through [tabpane]({{% ref "contributing-docs.md#tabbed-content" %}})
- Contain steps to download/install any required pre-requisites. Someone coming in with a fresh OS install should be able to start on the example and complete it without an error. Links to external download pages are fine.

## Docs

The `daprdocs` directory contains the markdown files that are rendered into the [Dapr Docs](https://docs.dapr.io) website. When the documentation website is built this repo is cloned and configured so that its contents are rendered with the docs content. When writing docs keep in mind:

- All rules in the [docs guide]({{% ref contributing-docs.md %}}) should be followed in addition to these.
- All files and directories should be prefixed with `go-` to ensure all file/directory names are globally unique across all Dapr documentation.
28 changes: 28 additions & 0 deletions sdkdocs/go/content/en/go-sdk-docs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
type: docs
title: "Dapr Go SDK"
linkTitle: "Go"
weight: 1000
description: Go SDK packages for developing Dapr applications
no_list: true
cascade:
github_repo: https://github.com/dapr/go-sdk
github_subdir: daprdocs/content/en/go-sdk-docs
path_base_for_github_subdir: content/en/developing-applications/sdks/go/
github_branch: main
---

A client library to help build Dapr applications in Go. This client supports all public Dapr APIs while focusing on idiomatic Go experiences and developer productivity.

{{% cardpane %}}
{{% card title="**Client**"%}}
Use the Go Client SDK for invoking public Dapr APIs

[Learn more about the Go Client SDK]({{% ref go-client %}})
{{% /card %}}
{{% card title="**Service**"%}}
Use the Dapr Service (Callback) SDK for Go to create services that will be invoked by Dapr.

[Learn more about the Go Service (Callback) SDK]({{% ref go-service %}})
{{% /card %}}
{{% /cardpane %}}
Loading
Loading