Building Temporal server as Go application failing


I am new to Temporal. I want to run the Temporal server as Go application. I followed the steps described in “Start options” doc. As per this I have written a simple Go code (temporal_server.go) like below:

package main

import (

func main()  {
        s := temporal.NewServer(
        err := s.Start()
        if err != nil{

When I build it I get below errors:

    > go build temporal_server.go
C:\Users\Avik Sil\go\pkg\mod\\uber\tchannel-go@v1.21.0\thrift\gen-go\meta\meta.go:67:34: not enough arguments in call to oprot.WriteMessageBegin
        have (string, thrift.TMessageType, int32)
        want (context.Context, string, thrift.TMessageType, int32)

Please help me fix this issue. Let me know I am missing anything.


Are you using Go modules to include the temporal dependency? What is the content of go.mod that references temporal?

make sure to use this


Thanks for all the helps. I am able to build and run the temporal server successfully now.

1 Like