Tumgik
#c: showverse
Text
Mike: *is choking*
Davy: Quick, call 911!
Micky: We can’t, the ‘9’ button on the dial is broken!
Peter: Turn the phone upside down and use the 6!
Micky: GENIUS!
Mike: *stops choking* ‘scuse me?!
48 notes · View notes
markantonys · 9 months
Text
previously i'd speculated all 4 polycule members will meet at falme at the end of s2, but the more i think about it, the more i suspect min won't go to falme in the show.
a) no sign of her in any of the images/shots from falme we have so far, or in the pic of the 3 wondergirls preparing for a trip. of course, i can't base an argument that she won't be in falme only on the fact that we don't have proof that she will be, but at the very least, we don't have proof that she will be.
b) unless they plan to significantly change her one non-rand-centric canon storyline, she needs to be at the white tower in season 3. no one else who will end s2 in falme will be headed for tar valon in s3 (no, for the love of god, egwene and elayne are NOT going to make a detour there in s3 just so they can take the accepted tests their stories don't actually need them to take), so it feels unlikely to me that min would travel halfway across the continent back to the white tower all by herself rather than joining one of the other roadtrips or being asked to join by someone who wants her viewings to help them out (for example, elayne and nynaeve would surely be eager for her help with black ajah hunting). not impossible, but just kinda clunky to have her go from tar valon to falme back to tar valon in quick succession rather than simply staying in tar valon the whole time.
c) the only things we know for certain about min in s2 are that her aunts have been cast and that at some point she is standing in front of a window that looks like the window in what appears to be rand's inn room in cairhien in the trailer (this is a quick post so i'm not digging up screenshots, but i did a window comparison the other day and confirmed that min's window defs is similar to/the same as the window in that shot of rand channeling fire alone at night). we also know for certain from s1 that her hometown is tar valon in the showverse, and we can predict with decent confidence that siuan makes a trip to cairhien in s2 while rand is there. now let's pull all this together into a prediction.
after losing her livelihood in fal dara, min heads home to her aunts in tar valon, and tar valon is where we first see her in season 2. maybe we start with a taste of her home life (so that she can actually have a backstory and relationships outside of rand), and then she winds up in the white tower (maybe because moiraine suspects she'd go to tar valon after leaving fal dara and has gotten word to siuan to keep an eye out for her). she spends an episode or two or three forming connections with siuan, the wondergirls, and possibly mat, and maybe having her powers studied by aes sedai or trying to research them herself. siuan gets wind (probably from moiraine) that rand is the dragon reborn and is currently in cairhien, so around mid/mid-late season, she travels there with logain (whom she hopes can teach rand to channel) and min (whom she hopes might have useful viewings about rand) in tow. the three of them spend one episode there and all return to tar valon at the end of it so they'll be in place for their s3 storyline. this is the last we see of min, siuan, and logain in s2.
i'll also add a very flimsy d) i read some random person on the internet claim that kae alexander isn't a regular in s2, so if true, that would likely mean she doesn't appear in all 8 episodes, which could in turn mean she'll be absent from the late season if my speculation that she'll be present in the early and middle season is correct.
so, what are the story implications of min not going to falme? honestly..........not much. the fact that she was kidnapped by the seanchan and witnessed their abuse of egwene firsthand had so little effect on her in subsequent books that i had genuinely completely forgotten it had happened by about book 4. i remember thinking later in the series "huh, i remember min was at falme, but how the hell did she even get there?" and drawing a total blank! her involvement in that storyline was literally never referenced again after TDR-ish. so i could imagine that rafe & co might have taken a look at her long-term book arc (lmao at the idea that min even has a long-term book arc to look at!) and decided to jettison her falme stuff because it never plays a role in her story again, especially if the restructuring of other characters' timelines means that min being in falme would make it difficult for her to make it to her much-more-important tower storyline in s3.
what does this mean for polycule development? again, not much. it would be a small bummer to lose the chance of min and aviendha meeting before either gets involved with rand, but that's not a big deal because i'm still confident the show will make much more of an effort to develop their relationship in later seasons than the books did. i do worry that we might lose out on some TGH min-elayne bonding (more because of min's potential cairhien trip than her potential falme absence), but as long as they have some hangout time in an early episode(s) of s2 and get to spend more time together later on than they do in the books, that's okay.
min would lose the TGH confrontation with lanfear over rand, but a) she would instead get more bonding time with an Actually Conscious rand during their cairhien episode, and that would be much more meaningful & believable relationship development than her telling lanfear she's got a claim on this rando she talked to one time, and b) i really am frothing at the mouth for that confrontation to go to egwene instead, with lanfear taunting her for choosing the tower over rand and that turning into a sort of "we may not be right for each other as romantic partners but i'll always love him in one way or another, so fuck off, lanfear" moment of closure for egwene like rand got in 1x08. and i for one would much prefer a natural, gradual relationship development for the polycule over the show broadcasting "Rand Is Fated To Have 3 Girlfriends, And Here's Who They Are" before anyone's remotely close to getting together, like the books did, and it would be all too easy for that broadcasting to happen if all 4 of them crossed paths at falme and if min had the confrontation with lanfear.
31 notes · View notes
lemonhemlock · 1 year
Note
This is going to sound crazy but bear with- both the very intense L*cemond shippers and the very intense Al*smond shippers have a lot of crossover. They both take these underdeveloped characters (Alys even more so because we have no showverse version of her) and hardcore project their own specific ideas of the ship so much that they are determined it is canon. Luke is a sweet character, but he becomes this total martyr who was so crucial and important to the Targaryen Dynasty as a whole. Alys is half of this incredible love story and only a misunderstood young woman with great powers. This is why some very hardcore Alys stans were shocked an actress in her late 30s was auditioning 😭 B/C she’s always 25 in their fancasts
I agree there is a degree of projection that explains these two ships' popularity. Not that I think it's a bad thing necessarily, since fandom is escapism, but certainly interesting to consider, keeping in mind the vehement discourses that have been circulating and the shipping wars.
However, I was really not aware that so many alysmonds wanted a 25-year-old to play Alys? It's very specifically mentioned that Alys is a MILF-type character, she is supposed to have nursed several children already and is either "twice or thrice" Aemond's age. So late 30s at the very least. Or. You know. Alicent's age. Ahem. 👀
Anyway, I suspect there's a lot of whitewashing happening with this pairing already, when it's really not the poster child for healthy relationships. Ship what you want, but this is not the hill you'd be most successful to soapboax on.
10 notes · View notes
thesilverlady · 6 months
Note
(a bit of rant) the Hypocrisy is truly the only thing that destroyed my enjoyment of hotd/f&b people take the whole team thing waaay to seriously as if we're rooting for footballs teams and not an interesting story that could be analyzed and interpret in many ways . not to talk about the moral police who attack you for enjoying problematic characters\ships but also go in their way to enjoy other problematic characters\ships. like the asoiaf fandom was become waaay worse than it used to be after GOT s7\s8 for some reason
I completely get it and I'm sorry they sucked the enjoyment out of you.
I'll admit I used to get frustrated over some people who would say "it's just color wars" or "they all suck so pick a fav criminal and move on" 'cause in my mind that meant they didn't understand or appreciate the story told from the book but after taking some time offline and touching some grass, I came to the conclusion that while I can't and shouldn't push my interpretations onto others I also don't have to put up with terrible takes I see.
I'll admit the fandom has become an extremely unwelcoming space: side 1: are the book purists who while I 100% can sympathize with wanting a faithful adaptation, I've often see them treating others like shit over crackships and toxic pairs, as if the entirely of asoiaf isn't built on that. The truth is they don't really care about "problematism" they just hate seeing a character they like being (what they consider to be) misinterpreted by others in fan content like fics, headcanon and arts etc.
Again I sympathize because I used to feel the same for another fandom (the grisha trilogy) but holding onto these feelings can only make you feel miserable. The two healthy solutions I've found are: either move on or create content you want to see - because I guarantee there will be others who want to see the same thing you do
side 2: show viewers who don't care about the book (which is valid. you can't force someone to read or becoming invested in the lore) but will also lose their mind over canon discussions because it doesn't match up with the version that exist in the showverse so that leads them to interpret the rest of the fandom as whining and lacking joy because "it's not that deep" and "why can't you just enjoy this"
side 3: is a mixed of both, which i consider the worst bunch because there's no victory with them. You show too much love for the book? Then you automatically hate the cast and you're -ist -obic. You love the show? Have you written 10 think pieces a day and support what is commonly accepted for the characters by the fandom? Because if you haven't you're a fake. You like a single green character despite not supporting their side of the war? You're obviously a misogynist. You ship non-canon ships? you're deranged. You ship canon ships? you're problematic and an apologist.
See?
the way I've come to treat asoiaf as a whole (including f&b/hotd side) is how I treat the star wars fandom (which consists of a similiar toxic fanbase):
a) don't. enter. discourses.
you'll never change anyone's mind and they'll never change yours. Only enter an argument if the person gives normal sanity vibes or is a friend and won't have a problem if you two have different opinions on something
b) treat it as a solo thing.
The way I view this account is basically. I throw a ball at a wall and maybe someone will hear the noise and come play with me. Can it lonely? Sure. But it pays off when someone sees the earning signs I've left on this account and still decides to interact on their own
c) Be the person you want to interact with
This one can be hard because emotions always have a way to get in the way, but try to be someone you'd want to hang out in a fandom. In the past, I've gotten asks that say even though they don't agree with some of my interpretations about the characters they feel welcome here in regards of "teams". That's something I've been aiming for myself.
Anyways as to recent fandoms have become a bit of a nightmare with hypocrisy obsessive need for censorship and morality lessons as well as the quest of ending "romanticization" of anything, it has become a struggle for many. Try to combat it if you're willing because there are definitely other people other there who feel exactly the way you do.
Otherwise, a pause for personal space and to take care of yourself is never bad. In the end, I hope you can re-find some enjoyment for this fandom and if you ever need to vent more about it my asks & dms are open and judgement-free ♥
3 notes · View notes
joeyclaire · 2 years
Text
difference between bookverse a/c and showverse a/c is that in the book aziraphale and crowley have been gay married for thousands of years but in the show they have been gay pining from afar for thousands of years
9 notes · View notes
vickyvicarious · 2 years
Note
For the ask game: Rumplestiltskin, please!
Headcanon A:  realistic
This might even be canon, I can’t remember since it’s been a while and I stopped watching midway through the Camelot arc. But I like thinking about the tropes of determinism and self-fulfilling prophecies with Rumple specifically. Those spinsters he met + the seer who he met seem so linked to the Fates from greco-roman myth to me. I absolutely hated the Author storyline and don’t subscribe to that, but I do really like the idea of Rumple seeing the future as Dark One and building all his plans around his glimpses, but in doing so he makes all sorts of choices that turn against him later. More because of how he carries out his manipulations to ensure the events he sees come true, than because they happen. For example he knows Emma is gonna be the Savior, and he knows he has to be Dark One to make it happen so he rejects Belle, but maybe he didn’t have to be the Dark One after all, and if he weren’t trying so hard to fulfill his vision things would still happen some other way that he’d be happier for. That kind of thing, if that makes sense?
Headcanon B: while it may not be realistic it is hilarious
Allow me to point you towards my short but beloved “fashionista rumple” tag. Oh, yes, he very carefully curates those looks. He has opinions on everyone’s fashion choices. If he were ever to have retired to normal non-villainous life that doesn’t revolve around hoarding power or taunting people, his ideal career would be a personal stylist or clothing designer.
Headcanon C: heart-crushing and awful, but fun to inflict on friends
I’m gonna resist my impulse to go down the literal heart-crushing road here, tempting as it is. Instead, let’s say this... Rumple has never been happy without a caveat. More specifically, he’s never been satisfied where he is. He is so insecure and paranoid and hateful of himself/dismissive of others. He’s this giant control freak and always has to be smug and have plans within plans within plans... The closest he ever comes to simply enjoying himself in the moment is with Belle and Bae, but even then he can never relax. He’s too afraid to trust them, too hungry to prove himself, too resentful or guilty about the past. Every chance he’s ever had to be happy has been wasted, almost all of them due to his own issues and actions. And Rumple is completely self-aware about this, and it just makes things even worse in his head because he can never stop thinking.
Headcanon D: unrealistic, but I will disregard canon about it because I reject canon reality and substitute my own.
....I’m so sorry, the one thing that keeps popping into my head is bloodbender!Rumple from my OUATLA AU. I still love that verse so much.
Um, in terms of actual showverse I would really have loved going more into Rumple and Henry’s relationship. Even if Henry still doesn’t make the cut to be one of the people Rumple cares about enough to alter his behavior somewhat (an exclusive list indeed), in my mind there’s some conflict leading up to that decision. Some more scenes that appear as soon as Rumple learns who Henry is, and then more whenever Neal isn’t around. Oh, also I really like thinking about his relationship of weird mentor/respect/manipulator with Emma (I wrote a meta on it once actually). I guess my reject canon change there would be him teaching Emma magic instead of Regina. A lot of interesting character interactions there, especially with Killian too.
.
send me a character and I'll answer with 4 headcanons
13 notes · View notes
idanazaldrizes · 7 months
Text
@amongthevipers asked - What headcanons/theories do you believe fandom would invent about your character?
Tumblr media
oh boy, well first and foremost this Is the incest show about the incest house so there absolutely would have been theories about her with Luke or Jace, which? Considering showverse doesn't have them betrothed to Rhaena or Baela till like literally the last second before the Dance, i could definitely see there being theories about Rhaenyra debating a betrothal between Aerea and one of her brothers (likely Jace) during the timeskip.
also Very aware that fandom likes the starcrossed-enemies-to-lovers and reverse aspect of ae.mondxRhaenyra's daughter but i am warding that shit away from Aerea with Darksister. She may have felt bad for him when they were little but that Immediately ended once he hurt Luke and then tried to bash Jace's head in.
(If she Had to make like a Targ and keep it in the family she's more likely to have been into Rhaena and Baela anyway.)
morbidly curious to see what theories would come from the end of season one about her future involvement in the Dance, optimistically hoping people will Not have her rejoicing over B&C but like i've Seen green tumblr
1 note · View note
oh shit Sav does wear eyeshadow
3 notes · View notes
azurish · 7 years
Link
Chapters: 1/1 Fandom: Game of Thrones (TV) Rating: General Audiences Warnings: No Archive Warnings Apply Relationships: Missandei (ASoIaF)/Daenerys Targaryen, Daenerys Targaryen & Rhaegar Targaryen, Elia Martell/Rhaegar Targaryen Characters: Missandei (ASoIaF), Daenerys Targaryen, Rhaegar Targaryen, Elia Martell, Rhaenys Targaryen Additional Tags: Bad Poetry, Fluff, Humor, Brother-Sister Relationships, Modern Westeros, Alternate Universe - College/University, Love Poems Summary:
Rhaegar sank down into an armchair in his living room and closed his eyes. He wasn’t sure whether he was too tired to understand what his sister wanted or whether she really had just woken him at four am to ask him to proofread poetry. “Is this for a class?” he asked. “Oh, no, it’s for a girl,” Daenerys said.
Daenerys has fallen head-over-heels for a cute linguistics major. After learning that Missandei thinks Valyrian "is the only proper language for poetry," she's not going to let anything - from her own inability to rhyme to inconvenient time zones - get in the way of wooing her girl. Rhaegar just wishes that having written folk rock harp ballads in his embarrassing high school band phase didn't make him the closest thing his little sister has to an editor.
2 notes · View notes
So just randomly, I was watching a con video (I was leaping and hopping from video to video so don’t ask me which one lol) where Jensen says something to the effect of “we tried to get two supernatural spinoffs launched but they failed so...” & it hit me, oh right, the Wayward Sisters, wth ever happened with that?
I knew it hadn’t gotten off the ground but I never knew why. (I wasn’t as involved in the fandom at the time when that episode aired) So I looked it up because I was genuinely curious as to what happened and came across this.
Are you kidding me? I would have loved to watch Jody and Donna and Claire and the girls carry on. Give me all the DreamHunter I can handle and more. I love Donna. I love Jody. I love Claire. I love Kaia and Patience and Alex. Can you imagine how badass that show would have been? As a follow up to the original? That could have been so amazing and they could have carved out their own niche in this universe. And for Legacies? (I’m not shading on Legacies, I’ve watched that, too)
Looking at all of the shows they have lined up now (outside of the DC showverse), you’re telling me that Wayward Sisters couldn’t have been better than that? Again, I’m not shading on the other shows but how in the hell did these people think that wouldn’t make a good show? After SPN was done? How...? What...? Why...? Who...? When...? Really? Especially since Legacies is a spinoff of a spinoff of another show? I just... It is what it is and it’s two years past, but seeing Dabb’s tweet at the end really paints this godforsaken picture even more. You really have to wonder just what all television creative teams have to deal with behind-the-scenes, especially after that whole chopped up ending we got for the original show. I...
Tumblr media
And for that matter, what was the second spinoff they tried??? Okay, you know what? The C*W doesn’t deserve these characters or the great stories that would have come out of this universe for these badass women. 
Tumblr media Tumblr media
Just...ugh.
Here’s hoping a certain someone in a few years gets the rights to that universe and can continue telling all of their stories with their own production company...I can’t imagine who that would be...
At all...
Tumblr media
12 notes · View notes
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
158 notes · View notes
pluckyredhead · 5 years
Note
For the characters meme, Matt+Karen.
Comicsverse: Romantically! They were adorable together and would totally still be together if she hadn’t died. (Well, they would have broken up and gotten back together eight or nine times, but you know what I mean.) I'm a Matt/Foggy endgame gal in all universes but I love the Matt/Karen relationship while it lasted.
Showverse: Platonically! They are so very similar to each other that I think they would be very bad for each other romantically, but I really love the deep level of understanding they reached by Season 3 when Matt finally, like, acknowledged the real actual human Karen is and not the version of her he had in his head. (I also just don’t think Charlie and Deborah have any chemistry, which is baffling to me because a) they adore each other, b) they are both SO BEAUTIFUL, and c) they both have outrageous chemistry with literally every other person they share the screen with.)
9 notes · View notes
janiedean · 5 years
Note
this has nothing at all to do with the Discourse of the Week or whatever but because of you and your fantastic fics, i'm sailing the good ship Brynden/JonCon off into the sunset. at least GoT will never tarnish Jon (even if i do kinda wish he existed in showverse JUST so he and JonAegon could interact ;A; )
ANON YOU ARE VERY MUCH WELCOME ABORD MY CRACKSHIP OF DREAMS I’M 100% GLAD TO HAVE YOU pls stay here we are a small group of people with excellent taste who like a+ characters ;) and we’re blissfully away from any kind of discourse because WHO WILL EVER DISCOURSE OVER BRYNDEN AND JON C ;) ;) and ikr anon irk xDDDD thanks!!!!
2 notes · View notes
fadedtoblue · 6 years
Note
after what happened in the defenders with matt and elektra, why wouldn't she be in season 3 though
YES, WHY WOULDN’T SHE? 
I think the general consensus in this particular corner of the fandom is that she SHOULD be and she damn well BETTER be, but all of this is still up to the new showrunner / writing team and how they decide to continue the DD story.  There’s going to be a lot going on with Fisk and if they adapt a combination if Born Again and Murdock Papers, Matt is going to be kept pretty damn busy…in fact, he might not have time to deal with anything other than staying alive and keeping his identity a secret :p. But it’s ridiculous to imagine that they won’t address the end of Defenders at some point during DDS3 (Matt survived a freaking building falling on him. Can’t just wave that away!) and since Elektra was last seen with Matt, you have to bring it up, and her, at least once. But how much she factors into the events of S3 is still pretty up in the air.
I’ll also say I’ve observed a fairly vocal contingent of fans who don’t care to see her in S3, mostly because they’re pretty sick of the Hand and those ppl naturally connect her to the Hand-centric storylines b/c…well, she was a big part of both in DDS2 and TDS1. But as I like to say to anyone who is willing to listen, Elektra canonically has quite a bit of involvement in the criminal underworld in the comics and her own connections to Fisk, etc. I don’t know how they’d get there in the showverse, but I’ve always maintained that it wouldn’t make any sense to sideline her from the show if we end up having Fisk and Bullseye in the same season. And I actually think she’d make for a much better adversary to Bullseye than Matt would, especially in the Netflix shows – Bullseye is such a ruthless agent of chaos and I don’t know, as excited as I am to see an eventual Bullseye / DD showdown, I really think Matt is going to get himself or someone else killed in the process b/c they’ve more or less doubled down on his moral code and how he won’t be able to go all the way to stop someone like Bullseye. Since they’ve taken out the comics reason for the Bullseye - Elektra enmity, it would cool to see them develop it another way, mostly in Elektra stepping in to protect Matt and his people and making the hard choices that Matt can’t bring himself to make. 
But to go back to your original question, if they touch upon the state of Matt’s relationships in the show (and they kind of have to), it would be 100% unrealistic to not address Mattelektra. We are so beyond the realm of college ex at this point. She died for him. He was willing to die for her. She will protect him at all costs. He loves her too much to let her turn her back on her humanity. I don’t mind if they keep them in separate arcs for a little while, but their story isn’t over and it won’t ever be over. 
18 notes · View notes
thewolfbit · 7 years
Note
You do know Robb took Sansa out of his will right? She is no queen, bro.
Hi! I assume you’re referring to my tag “Queen in the North” that I use for posts about Sansa. (Or “King and Queen in the North” which I used for a couple Jon x Sansa posts recently.) I know she’s not literally the QitN, it’s just a tag I use. But show!Sansa is definitely Lady of Winterfell (at least until Bran returns), which tells us that she hasn’t been disinherited.In the books, Robb considered disinheriting Sansa so the Lannisters wouldn’t be able to get their hands on the North, but we don’t have any information about whether or not the disinheritance was actually carried out. (@valiantnedspreciouslittlegirl discusses Robb’s will and Sansa way better than I ever could in this meta: http://valiantnedspreciouslittlegirl.tumblr.com/post/129375418508/this-might-sound-stupid-but-wasnt-sansa)We’re also talking about different story elements that are book- or show-exclusive… it’s basically apples and oranges. Sansa is only Lady of Winterfell in the show, and disinheriting Sansa was only discussed in the books. If Robb’s will did in fact disinherit Sansa, it doesn’t really have any bearing in showverse because a) his will was never discussed in the show; b) Sansa’s marriage with Tyrion is now annulled; c) the current KitN confirmed that Sansa is Lady of Winterfell.
13 notes · View notes
lupbiy · 7 years
Text
用 Golang 寫 Command line 工具
如果你要寫 Command line 工具,又想在各平台 (像是 MacOS, Windows 或 Linux) 上執行,這時候 Golang 就是您最好的選擇。在 Reddit 讀到一篇 Command line 工具比較介紹,這篇最主要講到兩個 CLI 工具,一個是 urfave/cli,另一個是 spf13/cobra,這兩個工具其實都非常好用,後者是去年加入 Google Golang 團隊的 spf13 所開發,該作者加入 Google 後呢,非常的忙,但是強者他同事有幫忙繼續維護 cobra 專案,兩個 CLI 工具各自都有有大型專案使用 urfave/cli 有 docker/libcompose, docker/machine, Drone, Gitea, Gogs 等,而後者 spf13/cobra 則有 docker, docker/distribution, etcd 等。本篇筆者會介紹 urfave/cli 該如何使用?
用 Golang 內建 flag 套件
其實 Golang 本身就有支援 Command line 功能,只要 import flag 就可以直接使用了
package main import ( "flag" "fmt" "os" ) func main() { var showVersion bool flag.BoolVar(&showVersion, "version", false, "Print version information.") flag.BoolVar(&showVersion, "v", false, "Print version information.") flag.Parse() // Show version and exit if showVersion { fmt.Println("Version 1.0.0") os.Exit(0) } }
存檔成 main.go,執行 go build -o main 就可以產生 main 執行檔,最後可以直接下 ./main -v 畫面就會顯示 Version 1.0.0。但是如果 flag 非常多,寫起來就會相當長,也不支援讀取 Environment 環境變數,這時候我們可以透過 urfave/cli 來簡化此流程。上面的範例可以在底下連結找到
用 Golang flag 寫 Command Line
使用 urfave/cli 套件
底下是一個簡單範例,可以從 command line 讀取使用者帳號密碼
package main import ( "fmt" "os" "http://ift.tt/2lb5hVL; ) type ( // Config information. Config struct { username string password string } ) var config Config func main() { app := cli.NewApp() app.Name = "Example" app.Usage = "Example" app.Action = run app.Flags = []cli.Flag{ cli.StringFlag{ Name: "username,u", Usage: "user account", }, cli.StringFlag{ Name: "password,p", Usage: "user password", }, } app.Run(os.Args) } func run(c *cli.Context) error { config = Config{ username: c.String("username"), password: c.String("password"), } return exec() } func exec() error { fmt.Println("username:", config.username) fmt.Println("password:", config.password) return nil }
從上面例子可以發現從 Name 就可以定義 Flag 名稱,用逗號分格,在命令列就可以使用 -u 或 --username,也會自動幫忙產生完整的 help 畫面
支援環境變數
在 Golang 可以快速的將執行檔打包成 Docker Image
FROM centurylink/ca-certs ADD main / ENTRYPOINT ["/main"]
在 Dockerfile 內使用參數可以透過 CMD 會變成底下
FROM centurylink/ca-certs ADD main / ENTRYPOINT ["/main"] CMD ["-u", "appleboy"]
這樣非常麻煩,這時候就要讓 CLI 也支援環境變數,將 cli.StringFlag 改成如下
app.Flags = []cli.Flag{ cli.StringFlag{ Name: "username,u", Usage: "user account", + EnvVar: "DOCKER_USERNAME", }, cli.StringFlag{ Name: "password,p", Usage: "user password", + EnvVar: "DOCKER_PASSWORD", }, }
直接在命令列執行 DOCKER_USERNAME=appleboy ./main,則就會抓到 DOCKER_USERNAME 環境變數,在 Docker 指令就可以補上 -e 參數來實現變數傳遞:
$ docker run -e DOCKER_USERNAME=appleboy appleboy/cli
結論
把 Golang 執行檔包進去 Docker Image,就可以再任意環境內執行,如果你不想使用 Docker Image 也沒關係,Golang 支援跨平台編譯,底下是支援 Windows, Linux, MacOS 編譯參數
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bin/main-linux GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o bin/main.exe GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o bin/main-darwin
自從學了 Golang,讓用 Windows 工作的同事,也可以享用 Golang 的好處。上述範例檔案可以參考底下連結
用 urfave/cli 寫 Command Line
Related View
用 Docker 發送 Line 訊息 (5)
Caddy 搭配 Drone 伺服器設定 (0)
2016 COSCUP 用 Golang 寫 Microservices (0)
在 MAC OS 快速又簡單安裝 Docker 環境 – dlite (0)
在 linkit smart 7688 寫 golang (1)
用 drone-line 架設 Line webhook 及發送訊息 (0)
輕量級 Gofight 支援 Echo 框架測試 (0)
開發者另類的自架 Git 服務選擇: Gitea (3)
在 Travis 實現 Docker Cache (0)
用 Travis 自動上傳 Docker Image 到 Docker Registry (1)
0 notes