var f os.File
if f, e = os.Open("foo.txt"); e != nil {
log.Fatal("error opening file; %s", e)
}
im not sure if its much better.
# 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 238041 # self = https://watcher.sour.is?offset=230369 # next = https://watcher.sour.is?offset=230469 # prev = https://watcher.sour.is?offset=230269
var f os.File
if f, e = os.Open("foo.txt"); e != nil {
log.Fatal("error opening file; %s", e)
}
f := os.Open("foo.txt") or (e error) {
log.Fatal("error opening file; %s", e)
}
f := os.Open("foo.txt") or (e error) {
log.Fatal("error opening file; %s", e)
}
?
as suffix for boolean returning functions or as ternary operator (condition ? true_value : false_value
)?nil
return values in a graceful way without actually dereferencing and thus crashing. I probably never wrote more than 30 lines of Ruby in my entire life. Must have been some other language.
⨁ Follow
button on their profile page or use the Follow form and enter a Twtxt URL. You may also find other feeds of interest via Feeds. Welcome! 🤗