...
1rsc.io/quote@v1.0.0
2
3-- .mod --
4module "rsc.io/quote"
5-- .info --
6{"Version":"v1.0.0","Name":"f488df80bcdbd3e5bafdc24ad7d1e79e83edd7e6","Short":"f488df80bcdb","Time":"2018-02-14T00:45:20Z"}
7-- go.mod --
8module "rsc.io/quote"
9-- quote.go --
10// Copyright 2018 The Go Authors. All rights reserved.
11// Use of this source code is governed by a BSD-style
12// license that can be found in the LICENSE file.
13
14// Package quote collects pithy sayings.
15package quote // import "rsc.io/quote"
16
17// Hello returns a greeting.
18func Hello() string {
19 return "Hello, world."
20}
21-- quote_test.go --
22// Copyright 2018 The Go Authors. All rights reserved.
23// Use of this source code is governed by a BSD-style
24// license that can be found in the LICENSE file.
25
26package quote
27
28import "testing"
29
30func TestHello(t *testing.T) {
31 hello := "Hello, world."
32 if out := Hello(); out != hello {
33 t.Errorf("Hello() = %q, want %q", out, hello)
34 }
35}
View as plain text