无法通过var.MethodName()从另一个包访问方法

I have a package containing some structure and functions associated with it:

package samplepkg

type SampleStruct struct {
    FirstString string
    SecondString string
}

func init() {
    // some operations
}

func CheckSomething(s *SampleStruct) bool {
    // check something
}

Now I'm trying to run this function in another package:

import (
    "MyProject/samplepkg"
)

func testFunc() {
    var s = samplepkg.SampleStruct{"a", "b"}
    if s.CheckSomething() {
        // do some operations
    }
}

But I get an error that s.CheckSomething is undefined. (&s).CheckSomething gives the same result. I can access s.FirstString and s.SecondString as well as use this method by calling

if samplepkg.CheckSomething(&s) {
    // do some operations
}

But I feel it could be written in a better way. I'm aware that Go is not object-oriented language but is method invocation like this possible?

In Golang a Method set is defined as:

A type may have a method set associated with it. The method set of an interface type is its interface. The method set of any other type T consists of all methods declared with receiver type T. The method set of the corresponding pointer type *T is the set of all methods declared with receiver *T or T (that is, it also contains the method set of T). Further rules apply to structs containing embedded fields, as described in the section on struct types. Any other type has an empty method set. In a method set, each method must have a unique non-blank method name.

There is a mistake because you are using the pointer receiver with method when calling the function. So change the function when defining to method as:

func init() {
    // some operations
}

func(s *SampleStruct) CheckSomething() bool {
    // check something
}

Or when calling the method it should be function with argument SampleStruct which will be like

import (
    "MyProject/samplepkg"
)

func testFunc() {
    var s = &samplepkg.SampleStruct{"a", "b"}
    if CheckSomething(s) {
        // do some operations
    }
}