aboutsummaryrefslogtreecommitdiff
path: root/something/something.go
diff options
context:
space:
mode:
Diffstat (limited to 'something/something.go')
-rw-r--r--something/something.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/something/something.go b/something/something.go
new file mode 100644
index 0000000..2516b2d
--- /dev/null
+++ b/something/something.go
@@ -0,0 +1,23 @@
+package something
+
+import (
+ "fmt"
+
+ "www.thenautilus.net/cgit/go-example/config"
+)
+
+type Something struct {
+ value int
+}
+
+func New(conf *config.SomethingConfig) Something {
+ return Something{
+ value: conf.Value,
+ }
+}
+
+func (s *Something) DoSomething() error {
+ fmt.Printf("the value is %d", s.value)
+
+ return nil
+}