Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a created by someone #1

Closed
GeekTree0101 opened this issue Aug 18, 2021 · 0 comments
Closed

Support a created by someone #1

GeekTree0101 opened this issue Aug 18, 2021 · 0 comments
Assignees
Labels
improvement improve the function

Comments

@GeekTree0101
Copy link
Owner

Solutions

get os username from os/user

package main

import (
	"fmt"
	"log"
	"os/user"
)

func main() {

	user, err := user.Current()
	if err != nil {
		log.Fatalf(err.Error())
	}

	username := user.Username

	fmt.Printf("Username: %s\n", username)
}

Before

//
//  __SCENE_NAME__Router.swift
//  __TARGET_PROJECT_NAME__
//
//  Created by clean-swift-scaffold on __DATE__.
//  Copyright © __YEAR__ __COPYRIGHT__. All rights reserved.
//

After

//
//  __SCENE_NAME__Router.swift
//  __TARGET_PROJECT_NAME__
//
//  Created by __WHO__ on __DATE__.
//  Copyright © __YEAR__ __COPYRIGHT__. All rights reserved.
//
@GeekTree0101 GeekTree0101 added the improvement improve the function label Aug 18, 2021
@GeekTree0101 GeekTree0101 self-assigned this Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement improve the function
Projects
None yet
Development

No branches or pull requests

1 participant