Skip to content

Commit

Permalink
updating documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurs committed Mar 15, 2021
1 parent 49c7e57 commit fd2e19d
Show file tree
Hide file tree
Showing 5 changed files with 382 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gomarkdoc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output: "{{.Dir}}/README.md"
header: |+
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/go-coldbrew/options)
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.PHONY: build test doc
build:
go build ./...

test:
go test ./...

doc:
go get github.com/princjef/gomarkdoc/cmd/gomarkdoc
gomarkdoc ./...
72 changes: 71 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,71 @@
# options
<!-- Code generated by gomarkdoc. DO NOT EDIT -->

[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/go-coldbrew/options)

# options

```go
import "github.com/go-coldbrew/options"
```

## Index

- [func AddToOptions(ctx context.Context, key string, value interface{}) context.Context](<#func-addtooptions>)
- [type Options](<#type-options>)
- [func FromContext(ctx context.Context) Options](<#func-fromcontext>)
- [func (o Options) Add(key string, value interface{})](<#func-options-add>)
- [func (o Options) Del(key string)](<#func-options-del>)
- [func (o Options) Get(key string) (interface{}, bool)](<#func-options-get>)


## func [AddToOptions](<https://github.com/go-coldbrew/options/blob/main/options.go#L28>)

```go
func AddToOptions(ctx context.Context, key string, value interface{}) context.Context
```

AddToOptions adds options to context

## type [Options](<https://github.com/go-coldbrew/options/blob/main/options.go#L15>)

Options are request options passed from Orion to server

```go
type Options map[string]interface{}
```

### func [FromContext](<https://github.com/go-coldbrew/options/blob/main/options.go#L18>)

```go
func FromContext(ctx context.Context) Options
```

FromContext fetchs options from provided context

### func \(Options\) [Add](<https://github.com/go-coldbrew/options/blob/main/options.go#L41>)

```go
func (o Options) Add(key string, value interface{})
```

Add to Options

### func \(Options\) [Del](<https://github.com/go-coldbrew/options/blob/main/options.go#L46>)

```go
func (o Options) Del(key string)
```

Del an options

### func \(Options\) [Get](<https://github.com/go-coldbrew/options/blob/main/options.go#L51>)

```go
func (o Options) Get(key string) (interface{}, bool)
```

Get an options



Generated by [gomarkdoc](<https://github.com/princjef/gomarkdoc>)
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module github.com/go-coldbrew/options

go 1.15

require github.com/stretchr/testify v1.6.1
require (
github.com/princjef/gomarkdoc v0.1.3 // indirect
github.com/stretchr/testify v1.6.1
)
Loading

0 comments on commit fd2e19d

Please sign in to comment.