package sequence
Import Path
github.com/AlexanderGrooff/mermaid-ascii/pkg/sequence (on go.dev)
Dependency Relation
imports 5 packages, and imported by one package
Code Examples
package main
import (
"fmt"
"github.com/AlexanderGrooff/mermaid-ascii/pkg/sequence"
)
func main() {
sequenceInput := `sequenceDiagram
A->>B: Test`
graphInput := `graph LR
A-->B`
fmt.Printf("First is sequence: %v\n", sequence.IsSequenceDiagram(sequenceInput))
fmt.Printf("Second is sequence: %v\n", sequence.IsSequenceDiagram(graphInput))
}
package main
import (
"fmt"
"log"
"github.com/AlexanderGrooff/mermaid-ascii/pkg/sequence"
)
func main() {
input := `sequenceDiagram
Alice->>Bob: Hello
Bob-->>Alice: Hi`
sd, err := sequence.Parse(input)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Participants: %d\n", len(sd.Participants))
fmt.Printf("Messages: %d\n", len(sd.Messages))
}
Package-Level Type Names (total 5)
( ArrowType) String() string
ArrowType : expvar.Var
ArrowType : fmt.Stringer
const DottedArrow
const SolidArrow
BoxChars defines the characters used for drawing the diagram.
ArrowLeft rune
ArrowRight rune
BottomLeft rune
BottomRight rune
Cross rune
DottedLine rune
Horizontal rune
SelfBottom rune
SelfTopRight rune
SolidLine rune
TeeDown rune
TeeLeft rune
TeeRight rune
TopLeft rune
TopRight rune
Vertical rune
var ASCII
var Unicode
ArrowType ArrowType
From *Participant
Label string
// Message number when autonumber is enabled (0 means no number)
To *Participant
SequenceDiagram represents a parsed sequence diagram.
Autonumber bool
Messages []*Message
Participants []*Participant
func Parse(input string) (*SequenceDiagram, error)
func Render(sd *SequenceDiagram, config *diagram.Config) (string, error)
Package-Level Functions (total 3)
func IsSequenceDiagram(input string) bool func Parse(input string) (*SequenceDiagram, error)
Package-Level Constants (total 5)
const DottedArrow ArrowType = 1 const DottedArrowSyntax = "-->>" const SequenceDiagramKeyword = "sequenceDiagram" const SolidArrow ArrowType = 0 const SolidArrowSyntax = "->>"
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |