title: Unable to set the property of a struct
body: <p>I'm trying to learn how to use structs in go.</p>
  
  <p>I have the following package</p>
  
  <pre><code>// src/db/db.go
  package db
  
  type DB struct {
    pk string
  }
  
  func (db DB) SetPk(s string)  {
    db.pk = s
  }
  func (db DB) GetPk() string {
    return db.pk
  }
  </code></pre>
  
  <p>And this is my main.go</p>
  
  <pre><code>package main
  
  import (
    "log"
    "db"
  )
  
  func main() {
  
    d := db.DB{}
    d.SetPk("Hello World")
    log.Println(d.GetPk())
  
  }
  </code></pre>
  
  <p>When I run the command <code>go run main.go</code>, I get a line break in my command prompt.  I verified that both the SetPk and GetPk are being fired, and that the SetPk is assigning a value to db.pk.  But the moment GetPk is fired, db.pk is empty again.</p>
  
  <p>How do I get the db object to retain the pk value and return it in GetPk?</p>