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

Default format to file extension #28

Closed
jmgilman opened this issue Jun 19, 2022 · 0 comments · Fixed by #37 · May be fixed by #31
Closed

Default format to file extension #28

jmgilman opened this issue Jun 19, 2022 · 0 comments · Fixed by #37 · May be fixed by #31
Labels
Effort: 2 Priority: Medium This issue is prioritized as medium Type: Feature This issue targets a new feature

Comments

@jmgilman
Copy link
Collaborator

The README provides this example:

let
  configData = {
    "field1" = "value1";
    "field2" = true;
  };
in
nixago.lib.make {
  inherit configData;
  output = "config.json";
  format = "json";
  engine = nixago.engines.nix { }; # Optional as this is the default value
}

It seems slightly repetitive to specify an output file of config.json and then specify the format as json. We could potentially optimize for this case by defaulting the format option to the extension of the output option. This may be tricky in certain cases (i.e., yml or yaml?), but it should satisfy a number of easy scenarios.

@jmgilman jmgilman added Status: Accepted This issue has been accepted Type: Feature This issue targets a new feature Priority: Medium This issue is prioritized as medium Effort: 2 Status: In Progress This issue is actively being worked on and removed Status: Accepted This issue has been accepted labels Jun 19, 2022
@jmgilman jmgilman removed the Status: In Progress This issue is actively being worked on label Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort: 2 Priority: Medium This issue is prioritized as medium Type: Feature This issue targets a new feature
Projects
None yet
1 participant