sourcecode.social -> github.com
parent
81a88742b3
commit
4ce81358ad
10
README.md
10
README.md
|
@ -6,15 +6,15 @@ In other programming languages, an **optional-type** might be know as: a **optio
|
|||
|
||||
## Documention
|
||||
|
||||
Online documentation, which includes examples, can be found at: http://godoc.org/sourcecode.social/reiver/go-opt
|
||||
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-opt
|
||||
|
||||
[![GoDoc](https://godoc.org/sourcecode.social/reiver/go-opt?status.svg)](https://godoc.org/sourcecode.social/reiver/go-opt)
|
||||
[![GoDoc](https://godoc.org/github.com/reiver/go-opt?status.svg)](https://godoc.org/github.com/reiver/go-opt)
|
||||
|
||||
## Examples
|
||||
|
||||
Here is an example **optional-type** that can hold a string:
|
||||
```go
|
||||
import "sourcecode.social/reiver/go-opt"
|
||||
import "github.com/reiver/go-opt"
|
||||
|
||||
//
|
||||
|
||||
|
@ -59,14 +59,14 @@ if found {
|
|||
|
||||
To import package **opt** use `import` code like the follownig:
|
||||
```
|
||||
import "sourcecode.social/reiver/go-opt"
|
||||
import "github.com/reiver/go-opt"
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
To install package **opt** do the following:
|
||||
```
|
||||
GOPROXY=direct go get https://sourcecode.social/reiver/go-opt
|
||||
GOPROXY=direct go get https://github.com/reiver/go-opt
|
||||
```
|
||||
|
||||
## Author
|
||||
|
|
4
go.mod
4
go.mod
|
@ -1,5 +1,5 @@
|
|||
module sourcecode.social/reiver/go-opt
|
||||
module github.com/reiver/go-opt
|
||||
|
||||
go 1.18
|
||||
|
||||
require sourcecode.social/reiver/go-erorr v0.0.0-20230922202459-231149d185a1 // indirect
|
||||
require github.com/reiver/go-erorr v0.0.0-20240704145350-0485e21eaa82
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,2 +1,2 @@
|
|||
sourcecode.social/reiver/go-erorr v0.0.0-20230922202459-231149d185a1 h1:wpnz4JicQBLWrgGphYBls7DysIFCcnWgDz/vce/sY8E=
|
||||
sourcecode.social/reiver/go-erorr v0.0.0-20230922202459-231149d185a1/go.mod h1:NFtd7fzEf0r6A6R7JXYZfayRhPaJy0zt/18VWoLzrxA=
|
||||
github.com/reiver/go-erorr v0.0.0-20240704145350-0485e21eaa82 h1:xxt7qL+7ZfRysXWXU2MpULOg/zWe5P+Fmw9VyUFCmZE=
|
||||
github.com/reiver/go-erorr v0.0.0-20240704145350-0485e21eaa82/go.mod h1:F0HbBf+Ak2ZlE8YkDW4Y+KxaUmT0KaaIJK6CXY3cJxE=
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"fmt"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package opt_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_IsNothing_int(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package opt_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_IsSomething_int(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package opt
|
|||
import (
|
||||
"encoding/json"
|
||||
|
||||
"sourcecode.social/reiver/go-erorr"
|
||||
"github.com/reiver/go-erorr"
|
||||
)
|
||||
|
||||
var _ json.Marshaler = Nothing[bool]()
|
||||
|
|
|
@ -3,7 +3,7 @@ package opt_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_MarshalJSON_bool(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package opt_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_MarshalJSON_int(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package opt_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_MarshalJSON_string(t *testing.T) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package opt
|
|||
import (
|
||||
"encoding/json"
|
||||
|
||||
"sourcecode.social/reiver/go-erorr"
|
||||
"github.com/reiver/go-erorr"
|
||||
)
|
||||
|
||||
const errNilReceiver = erorr.Error("opt: nil receiver")
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_UnmarshalJSON_bool(t *testing.T) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_UnmarshalJSON_int64(t *testing.T) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_UnmarshalJSON_int(t *testing.T) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_UnmarshalJSON_string(t *testing.T) {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"encoding/json"
|
||||
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
)
|
||||
|
||||
func TestOptional_UnmarshalJSON_uint64(t *testing.T) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package opt_test
|
||||
|
||||
import (
|
||||
"sourcecode.social/reiver/go-opt"
|
||||
"github.com/reiver/go-opt"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue