Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinJWendt committed Sep 9, 2023
2 parents 0d0927c + 9ba700b commit d870edc
Showing 1 changed file with 46 additions and 49 deletions.
95 changes: 46 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<h1 align="center">AtomicGo | template</h1>
<h1 align="center">AtomicGo | utils</h1>

<p align="center">
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fatomicgo.dev%2Fapi%2Fshields%2Ftemplate&style=flat-square" alt="Downloads">
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fatomicgo.dev%2Fapi%2Fshields%2Futils&style=flat-square" alt="Downloads">

<a href="https://github.com/atomicgo/template/releases">
<img src="https://img.shields.io/github/v/release/atomicgo/template?style=flat-square" alt="Latest Release">
<a href="https://github.com/atomicgo/utils/releases">
<img src="https://img.shields.io/github/v/release/atomicgo/utils?style=flat-square" alt="Latest Release">
</a>

<a href="https://codecov.io/gh/atomicgo/template" target="_blank">
<img src="https://img.shields.io/github/actions/workflow/status/atomicgo/template/go.yml?style=flat-square" alt="Tests">
<a href="https://codecov.io/gh/atomicgo/utils" target="_blank">
<img src="https://img.shields.io/github/actions/workflow/status/atomicgo/utils/go.yml?style=flat-square" alt="Tests">
</a>

<a href="https://codecov.io/gh/atomicgo/template" target="_blank">
<img src="https://img.shields.io/codecov/c/gh/atomicgo/template?color=magenta&logo=codecov&style=flat-square" alt="Coverage">
<a href="https://codecov.io/gh/atomicgo/utils" target="_blank">
<img src="https://img.shields.io/codecov/c/gh/atomicgo/utils?color=magenta&logo=codecov&style=flat-square" alt="Coverage">
</a>

<a href="https://codecov.io/gh/atomicgo/template">
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-3-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
<a href="https://codecov.io/gh/atomicgo/utils">
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-0-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
</a>

<a href="https://opensource.org/licenses/MIT" target="_blank">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square" alt="License: MIT">
</a>

<a href="https://goreportcard.com/report/github.com/atomicgo/template" target="_blank">
<img src="https://goreportcard.com/badge/github.com/atomicgo/template?style=flat-square" alt="Go report">
<a href="https://goreportcard.com/report/github.com/atomicgo/utils" target="_blank">
<img src="https://goreportcard.com/badge/github.com/atomicgo/utils?style=flat-square" alt="Go report">
</a>

</p>

---

<p align="center">
<strong><a href="https://pkg.go.dev/atomicgo.dev/template#section-documentation" target="_blank">Documentation</a></strong>
<strong><a href="https://pkg.go.dev/atomicgo.dev/utils#section-documentation" target="_blank">Documentation</a></strong>
|
<strong><a href="https://github.com/atomicgo/atomicgo/blob/main/CONTRIBUTING.md" target="_blank">Contributing</a></strong>
|
Expand All @@ -51,7 +51,7 @@
</tbody>
</table>
</p>
<h3 align="center"><pre>go get atomicgo.dev/template</pre></h3>
<h3 align="center"><pre>go get atomicgo.dev/utils</pre></h3>
<p align="center">
<table>
<tbody>
Expand All @@ -63,58 +63,54 @@

<!-- Code generated by gomarkdoc. DO NOT EDIT -->

# template
# utils

```go
import "atomicgo.dev/template"
import "atomicgo.dev/utils"
```

Package template is used to generate new AtomicGo repositories.
Package utils is a collection of useful, quickly accessible utility functions.

Write the description of the module here. You can use \*\*markdown\*\*\! This description should clearly explain what the package does.
## Index

Example description: https://golang.org/src/encoding/gob/doc.go
- [Variables](<#variables>)
- [func Ternary\[T any\]\(condition bool, a, b T\) T](<#Ternary>)
- [func ToJSON\(v any\) \(string, error\)](<#ToJSON>)

<details><summary>Example (Demo)</summary>
<p>

## Variables

<a name="File"></a>

```go
package main
var File = file{}
```

import (
"atomicgo.dev/template"
"fmt"
)
<a name="Net"></a>

func main() {
fmt.Println(template.HelloWorld())
```go
var Net = net{
Request: request{},
}
```

#### Output
<a name="Ternary"></a>
## func [Ternary](<https://github.com/atomicgo/utils/blob/main/utils.go#L22>)

```
Hello, World!
```go
func Ternary[T any](condition bool, a, b T) T
```

</p>
</details>

## Index
Ternary is a ternary operator. It returns a if the condition is true, otherwise it returns b.

- [func HelloWorld\(\) string](<#HelloWorld>)


<a name="HelloWorld"></a>
## func [HelloWorld](<https://github.com/atomicgo/utils/blob/main/template.go#L4>)
<a name="ToJSON"></a>
## func [ToJSON](<https://github.com/atomicgo/utils/blob/main/utils.go#L11>)

```go
func HelloWorld() string
func ToJSON(v any) (string, error)
```

HelloWorld returns \`Hello, World\!\`.


<details><summary>Example</summary>
<p>
Expand All @@ -125,19 +121,20 @@ HelloWorld returns \`Hello, World\!\`.
package main

import (
"atomicgo.dev/template"
"atomicgo.dev/utils"
"fmt"
)

func main() {
fmt.Println(template.HelloWorld())
type Person struct {
Name string
Age int
}
```

#### Output
func main() {
var person = Person{"John Doe", 42}

```
Hello, World!
fmt.Println(utils.ToJSON(person))
}
```

</p>
Expand Down

0 comments on commit d870edc

Please sign in to comment.