Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 10 additions & 0 deletions docs-go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
WEAVE=$(HOME)/go/bin/weave

all: $(WEAVE) flows.md models.md

$(WEAVE): ../go/internal/cmd/weave/*.go
go -C ../go install ./internal/cmd/weave

%.md: %.src
$(WEAVE) $< > $@

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions go/internal/cmd/weave/weave.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ func cleanListing(text, indent string) string {
return strings.Join(lines, "\n")
}

// leadingTabs counts the number of tabs that start s.
func leadingTabs(s string) int {
var i int
for i = 0; i < len(s); i++ {
Expand Down
19 changes: 19 additions & 0 deletions go/internal/doc-snippets/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Package snippets contains snippets that are incorporated into
// documentation (see the docs-go directory under the repo root).
package snippets

//go:generate make -C ../../../docs-go