Building Temporal server as Go application failing

Hello,

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 (
        "go.temporal.io/server/temporal"
)

func main()  {
        s := temporal.NewServer(
                temporal.InterruptOn(temporal.InterruptCh())
        )
        err := s.Start()
        if err != nil{
                log.Fatal(err)
        }
}

When I build it I get below errors:

    > go build temporal_server.go
C:\Users\Avik Sil\go\pkg\mod\github.com\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.

Thanks,
Avik

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

2 Likes

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

1 Like