Skip to content

Commit 56678c9

Browse files
Merge pull request #28 from jonboulle/improvements
Improvements
2 parents 7b45b30 + 9c4ec00 commit 56678c9

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.go]
12+
indent_style = tab

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/.idea/
2+
13
# Compiled Object files, Static and Dynamic libs (Shared Objects)
24
*.o
35
*.a

README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
clockwork
2-
=========
1+
# clockwork
32

4-
[![Build Status](https://travis-ci.org/jonboulle/clockwork.png?branch=master)](https://travis-ci.org/jonboulle/clockwork)
5-
[![godoc](https://godoc.org/github.com/jonboulle/clockwork?status.svg)](http://godoc.org/github.com/jonboulle/clockwork)
3+
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/avelino/awesome-go#utilities)
64

7-
a simple fake clock for golang
5+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jonboulle/clockwork/CI?style=flat-square)](https://github.com/jonboulle/clockwork/actions?query=workflow%3ACI)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/jonboulle/clockwork?style=flat-square)](https://goreportcard.com/report/github.com/jonboulle/clockwork)
7+
![Go Version](https://img.shields.io/badge/go%20version-%3E=1.11-61CFDD.svg?style=flat-square)
8+
[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/mod/github.com/jonboulle/clockwork)
89

9-
# Usage
10+
**A simple fake clock for Go.**
11+
12+
13+
## Usage
1014

1115
Replace uses of the `time` package with the `clockwork.Clock` interface instead.
1216

@@ -19,7 +23,7 @@ func myFunc() {
1923
}
2024
```
2125

22-
inject a clock and use its `Sleep` method instead:
26+
Inject a clock and use its `Sleep` method instead:
2327

2428
```go
2529
func myFunc(clock clockwork.Clock) {
@@ -65,6 +69,12 @@ myFunc(clockwork.NewRealClock())
6569

6670
See [example_test.go](example_test.go) for a full example.
6771

72+
6873
# Credits
6974

7075
clockwork is inspired by @wickman's [threaded fake clock](https://gist.github.com/wickman/3840816), and the [Golang playground](https://blog.golang.org/playground#TOC_3.1.)
76+
77+
78+
## License
79+
80+
Apache License, Version 2.0. Please see [License File](LICENSE) for more information.

0 commit comments

Comments
 (0)