# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 13
# self = https://watcher.sour.is/conv/dgmdxia
Tell me you write go like javascript without telling me you write go like javascript:


import "runtime/debug"

var Commit = func() string {
  if info, ok := debug.ReadBuildInfo(); ok {
    for _, setting := range info.Settings {
      if setting.Key == "vcs.revision" {
        return setting.Value
      }
    }
  }

  return "" 
}()



https://developers.redhat.com/articles/2022/11/14/3-ways-embed-commit-hash-go-programs#3__using_runtime_debug_package
@xuu Haha 🤣 I always use the first way to embed a version string or commit hash in any daemon or cli I write in Go -- Using the -ldflags option.
@xuu Haha 🤣 I always use the first way to embed a version string or commit hash in any daemon or cli I write in Go -- Using the -ldflags option.
@xuu Haha 🤣 I always use the first way to embed a version string or commit hash in any daemon or cli I write in Go -- Using the -ldflags option.
@xuu Haha 🤣 I always use the first way to embed a version string or commit hash in any daemon or cli I write in Go -- Using the -ldflags option.
@xuu @prologic Hahaha! :-D I also use the first one, if necessary. Each and every Go project of mine has a Makefile, so it's easily done. The second and especially third one sound quite weird to me.
@lyse @prologic yeah that was how i did it too. I think ill start using the debug version in new stuff since its been added. My comment was around assigning the result of an anonymous function to a a variable.
@lyse @prologic yeah that was how i did it too. I think ill start using the debug version in new stuff since its been added. My comment was around assigning the result of an anonymous function to a a variable.
@xuu I've done that in Go and C++, too. :-) It's not too bad.
@xuu Yup pretty funny but not surprising either since Go has first class functions like you'd expect 😆
@xuu Yup pretty funny but not surprising either since Go has first class functions like you'd expect 😆
@xuu Yup pretty funny but not surprising either since Go has first class functions like you'd expect 😆
@xuu Yup pretty funny but not surprising either since Go has first class functions like you'd expect 😆