The simplest way to get a diff in your go program is:
diff.Get(&diff.Config{}, spec1, spec2)
Note that oasdiff expects OpenAPI References to be resolved.
References are normally resolved automatically when you load the spec. In other cases you can resolve refs using Loader.ResolveRefsIn.